Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed an undefined variable and clarified the purpose of a test.

refs #4459.
  • Loading branch information...
commit ca874b2fe6f768bd042b859d7eba622a68e9f9dd 1 parent adedc31
@timgraham timgraham authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 tests/serializers_regress/models.py
View
11 tests/serializers_regress/models.py
@@ -244,10 +244,14 @@ class AutoNowDateTimeData(models.Model):
class ModifyingSaveData(models.Model):
data = models.IntegerField(null=True)
- def save(self):
- "A save method that modifies the data in the object"
+ def save(self, *args, **kwargs):
+ """
+ A save method that modifies the data in the object.
+ Verifies that a user-defined save() method isn't called when objects
+ are deserialized (#4459).
+ """
self.data = 666
- super(ModifyingSaveData, self).save(raw)
+ super(ModifyingSaveData, self).save(*args, **kwargs)
# Tests for serialization of models using inheritance.
# Regression for #7202, #7350
@@ -282,4 +286,3 @@ class LengthModel(models.Model):
def __len__(self):
return self.data
-
Please sign in to comment.
Something went wrong with that request. Please try again.