src/p4l/models/data.py
changeset 77 15b34232100d
parent 76 6dd1f5246e1c
child 93 c675183a9325
child 101 71532a54d1c4
--- a/src/p4l/models/data.py	Thu Sep 12 18:21:05 2013 +0200
+++ b/src/p4l/models/data.py	Thu Sep 12 18:24:28 2013 +0200
@@ -173,7 +173,7 @@
     isMultilingual = models.BooleanField() #iiep:isMultilingual
     
     def get_imprints_years(self):
-        return sorted(set([i.imprintDate for i in self.imprints.all()]))
+        return sorted(set([i.imprintDate for i in self.imprints.all() if i.imprintDate]))
 
     def __unicode__(self):
         return "Record id %s { identifier: %s, uri: %s, editionStatement: %s,  recordType: %s, isDocumentPart: %s, notes: %s, language : %s}" \