Save party before saving bank created from BIC

This prevents the warning about unsaved relation record.
This commit is contained in:
Cédric Krier
2024-06-09 15:03:51 +02:00
parent 390310d7de
commit 948c375e59
+1
View File
@@ -82,6 +82,7 @@ class Bank(ModelSQL, ModelView):
else:
name = None
bank = cls(party=Party(name=name), bic=bic.compact)
bank.party.save()
bank.save()
return bank