From 7cbee84611a85a577cf9e7d9793e9d47fdff7493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Mon, 2 Jan 2023 22:00:47 +0100 Subject: [PATCH] Skip on_change_parent on already saved account Closes #11871 --- modules/account/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/account/account.py b/modules/account/account.py index a6ac7f5d51..484c116034 100644 --- a/modules/account/account.py +++ b/modules/account/account.py @@ -1186,6 +1186,8 @@ class Account( def on_change_parent(self): if not self.parent: return + if self.id is not None and self.id >= 0: + return for field in self.__on_change_parent_fields: if (not getattr(self, field) or field in {'reconcile', 'deferral',