exclude pk_only models from beeing save_related

This commit is contained in:
collerek
2021-03-30 17:54:28 +02:00
parent 04047e4cd9
commit 4dc11b0de4
2 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@ class Model(ModelRow):
value = [value]
for val in value:
if not val.saved or save_all:
if (not val.saved or save_all) and not val.__pk_only__:
await val.upsert()
update_count += 1
if follow: