From b53485f1a6ab8f30f14f21d6fd5c2fc1604b52a5 Mon Sep 17 00:00:00 2001
From: Carlos Vega <carlos.vega@uni.lu>
Date: Tue, 19 Nov 2019 14:44:59 +0100
Subject: [PATCH] added pub representation

---
 models/publication.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/models/publication.py b/models/publication.py
index 43d39bb..ab6734a 100644
--- a/models/publication.py
+++ b/models/publication.py
@@ -5,3 +5,8 @@ class Publication:
         self.doi = doi
         self.preprint_id = preprint_id
         self.other_id = other_id
+
+    def __repr__(self):
+        ids = [("PMC_ID", self.pmc_id), ("PM_ID", self.pm_id), ("DOI", self.doi),
+               ("PREPRINT ID", self.preprint_id), ("OTHER ID", self.other_id)]
+        return ' '.join([str(id) for id in ids if id[1] is not None])
-- 
GitLab