From c5def4a5eca000dc72d863dd8a2f9b7e4c8ac929 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 26 Jul 2012 05:55:38 -0400 Subject: [PATCH] Add TODO reminder --- apps/documents/models.py | 3 +++ 1 file changed, 3 insertions(+) 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