Use pk, not id!

This commit is contained in:
2010-12-22 15:32:22 +00:00
parent 66b36fd186
commit cdce91db6f

View File

@@ -91,7 +91,7 @@ class CachedDocumentManager(models.Manager):
# If we have a error in the ignored error list use the cached doc, otherwise return the new doc # If we have a error in the ignored error list use the cached doc, otherwise return the new doc
if not error or not error in ROLLBACK_ERRORS: if not error or not error in ROLLBACK_ERRORS:
doc.save() doc.save()
doc = self.get(id=doc.pk) doc = self.get(pk=doc.pk)
# If this is user related, write a log instance # If this is user related, write a log instance
if params and params.get('userid', None): if params and params.get('userid', None):