diff --git a/apps/documents/models.py b/apps/documents/models.py index eb94051902..6f62126361 100644 --- a/apps/documents/models.py +++ b/apps/documents/models.py @@ -257,6 +257,9 @@ class Document(models.Model): @property def latest_version(self): + # TODO: an IndexError exception here is indicative of a corrupted + # database, find out how to handle (display empty doc or automatically + # delete with msg to user) return self.documentversion_set.order_by('-timestamp')[0] @property