Legimi button!
[redakcja.git] / src / documents / models / book.py
index 41e0bcd..1580f74 100644 (file)
@@ -278,6 +278,9 @@ class Book(models.Model):
         except IndexError:
             return None
 
+    def last_legimi_publish(self):
+        return self.legimibookpublish_set.order_by('-created_at').first()
+
     def assert_publishable(self):
         assert self.chunk_set.exists(), _('No chunks in the book.')
         try: