diff options
| author | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2023-12-06 23:19:09 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-12-08 09:46:11 +0100 |
| commit | b287af5dc954628d4b336aefc5027b2edceee64b (patch) | |
| tree | c5ab9d66dbc5d343dbeb684594d61558693a9295 /tests/model_fields/models.py | |
| parent | eeb2119985d9879b1d9ac3730ea0b53c0c019221 (diff) | |
Fixed #35019 -- Fixed save() on models with both GeneratedFields and ForeignKeys.
Thanks Deb Kumar Das for the report.
Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.
Diffstat (limited to 'tests/model_fields/models.py')
| -rw-r--r-- | tests/model_fields/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py index aea02964e2..69b4e26145 100644 --- a/tests/model_fields/models.py +++ b/tests/model_fields/models.py @@ -502,6 +502,7 @@ class GeneratedModel(models.Model): output_field=models.IntegerField(), db_persist=True, ) + fk = models.ForeignKey(Foo, on_delete=models.CASCADE, null=True) class Meta: required_db_features = {"supports_stored_generated_columns"} @@ -515,6 +516,7 @@ class GeneratedModelVirtual(models.Model): output_field=models.IntegerField(), db_persist=False, ) + fk = models.ForeignKey(Foo, on_delete=models.CASCADE, null=True) class Meta: required_db_features = {"supports_virtual_generated_columns"} |
