1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00: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 for f in meta.local_concrete_fields
if not f.generated and (pk_set or f is not meta.auto_field) 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( results = self._do_insert(
cls._base_manager, using, fields, returning_fields, raw cls._base_manager, using, fields, returning_fields, raw
) )