Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ross Lawley
2014-06-27 09:10:40 +01:00
2 changed files with 2 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ slightly different manner. First, a new file must be created by calling the
marmot.photo.write('some_more_image_data') marmot.photo.write('some_more_image_data')
marmot.photo.close() marmot.photo.close()
marmot.photo.save() marmot.save()
Deletion Deletion
-------- --------

View File

@@ -332,7 +332,7 @@ class BaseDocument(object):
pk = "None" pk = "None"
if hasattr(self, 'pk'): if hasattr(self, 'pk'):
pk = self.pk pk = self.pk
elif self._instance: elif self._instance and hasattr(self._instance, 'pk'):
pk = self._instance.pk pk = self._instance.pk
message = "ValidationError (%s:%s) " % (self._class_name, pk) message = "ValidationError (%s:%s) " % (self._class_name, pk)
raise ValidationError(message, errors=errors) raise ValidationError(message, errors=errors)