diff options
| author | sarahboyce <sarahvboyce95@gmail.com> | 2022-09-27 15:26:02 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-09-30 06:26:19 +0200 |
| commit | 6cc0f22a73970dd7c0d29d4d8d2ff9e1cc862b30 (patch) | |
| tree | ebd837bca2d06a6b109b5ee97648859a5635f00b /tests/get_or_create/models.py | |
| parent | 1d77b931f7df96ec4d6fa3835fe35547397cca1a (diff) | |
Fixed #32095 -- Made QuerySet.update_or_create() save only fields passed in defaults or with custom pre_save().
Thanks Florian Apolloner for the initial patch.
Diffstat (limited to 'tests/get_or_create/models.py')
| -rw-r--r-- | tests/get_or_create/models.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/get_or_create/models.py b/tests/get_or_create/models.py index f8f6157348..6875671501 100644 --- a/tests/get_or_create/models.py +++ b/tests/get_or_create/models.py @@ -63,3 +63,4 @@ class Book(models.Model): related_name="books", db_column="publisher_id_column", ) + updated = models.DateTimeField(auto_now=True) |
