summaryrefslogtreecommitdiff
path: root/tests/modeltests/update_only_fields/models.py
diff options
context:
space:
mode:
authorAndrei Antoukh <niwi@niwi.be>2012-08-12 22:17:54 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2012-08-12 22:39:27 +0300
commit99321e30cebbffeafc6ae19f4f92a0a665cbf19b (patch)
tree668b2766ef18a603d18253a12a8e00cfd5dde0c2 /tests/modeltests/update_only_fields/models.py
parent59a655988ee95e4b4e4646cebea88b620d8fcdd2 (diff)
Fixed #18306 -- Made deferred models issue update_fields on save
Deferred models now automatically update only the fields which are loaded from the db (with .only() or .defer()). In addition, any field set manually after the load is updated on save.
Diffstat (limited to 'tests/modeltests/update_only_fields/models.py')
-rw-r--r--tests/modeltests/update_only_fields/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/modeltests/update_only_fields/models.py b/tests/modeltests/update_only_fields/models.py
index 01184f715b..bf5dd99166 100644
--- a/tests/modeltests/update_only_fields/models.py
+++ b/tests/modeltests/update_only_fields/models.py
@@ -15,6 +15,7 @@ class Account(models.Model):
class Person(models.Model):
name = models.CharField(max_length=20)
gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
+ pid = models.IntegerField(null=True, default=None)
def __str__(self):
return self.name