It's more reliable to calculate the document checksum on the view and not on the save method, cache thumbnails and previews using document checksum and not the uuid

This commit is contained in:
Roberto Rosario
2011-02-10 01:06:28 -04:00
parent 07403954b5
commit adf4608a0c
2 changed files with 4 additions and 6 deletions

View File

@@ -91,10 +91,6 @@ class Document(models.Model):
def exists(self):
return self.file.storage.exists(self.file.url)
def save(self, *args, **kwargs):
self.update_checksum(save=False)
super(Document, self).save(*args, **kwargs)
def delete(self, *args, **kwargs):
#TODO: Might not execute when done in bulk from a queryset
#topics/db/queries.html#topics-db-queries-delete