Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

refs #4459.
  • Loading branch information...
commit ca874b2fe6f768bd042b859d7eba622a68e9f9dd 1 parent adedc31
Tim Graham authored October 10, 2013

Showing 1 changed file with 7 additions and 4 deletions. Show diff stats Hide diff stats

  1. 11  tests/serializers_regress/models.py
11  tests/serializers_regress/models.py
@@ -244,10 +244,14 @@ class AutoNowDateTimeData(models.Model):
244 244
 class ModifyingSaveData(models.Model):
245 245
     data = models.IntegerField(null=True)
246 246
 
247  
-    def save(self):
248  
-        "A save method that modifies the data in the object"
  247
+    def save(self, *args, **kwargs):
  248
+        """
  249
+        A save method that modifies the data in the object.
  250
+        Verifies that a user-defined save() method isn't called when objects
  251
+        are deserialized (#4459).
  252
+        """
249 253
         self.data = 666
250  
-        super(ModifyingSaveData, self).save(raw)
  254
+        super(ModifyingSaveData, self).save(*args, **kwargs)
251 255
 
252 256
 # Tests for serialization of models using inheritance.
253 257
 # Regression for #7202, #7350
@@ -282,4 +286,3 @@ class LengthModel(models.Model):
282 286
 
283 287
     def __len__(self):
284 288
         return self.data
285  
-

0 notes on commit ca874b2

Please sign in to comment.
Something went wrong with that request. Please try again.