A save method that modifies the data in the object. A user-defined save() method isn't called when objects are deserialized (#4459).
(self, *args, **kwargs)
| 282 | data = models.IntegerField(null=True) |
| 283 | |
| 284 | def save(self, *args, **kwargs): |
| 285 | """ |
| 286 | A save method that modifies the data in the object. |
| 287 | A user-defined save() method isn't called when objects are deserialized |
| 288 | (#4459). |
| 289 | """ |
| 290 | self.data = 666 |
| 291 | super().save(*args, **kwargs) |
| 292 | |
| 293 | |
| 294 | # Tests for serialization of models using inheritance. |
no outgoing calls