0
0
mirror of https://github.com/django/django.git synced 2024-11-21 19:09:18 +01:00

Update base.py

This commit is contained in:
长孙弘奕 2024-05-08 12:13:06 +08:00 committed by GitHub
parent b79ac89c57
commit b010e9f337
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1138,7 +1138,7 @@ class Model(AltersData, metaclass=ModelBase):
for f in meta.local_concrete_fields
if not f.generated and (pk_set or f is not meta.auto_field)
]
returning_fields = meta.db_returning_fields
returning_fields = [f for f in meta.db_returning_fields if not f.generated]
results = self._do_insert(
cls._base_manager, using, fields, returning_fields, raw
)