Updated Library view to show an icon if a record exists showing that the library...
[htsworkflow.git] / htsworkflow / frontend / samples / models.py
index 7199fbf8ea10eb547d56dd27a1955a127cc864b0..f51d250a8e862f7d562080adf0e0857f7f857e44 100644 (file)
@@ -183,6 +183,15 @@ class Library(models.Model):
     for t in affs:
         ar.append(t.__unicode__())
     return '%s' % (", ".join(ar))
+    
+  def is_archived(self):
+    """
+    returns True if archived else False
+    """
+    if self.longtermstorage_set.count() > 0:
+        return True
+    else:
+        return False
 
   def libtags(self):
     affs = self.tags.all().order_by('tag_name')