From f9a638e951dcfe025aeee9341a93fda36e82974a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 25 Nov 2023 18:31:08 +0100 Subject: [PATCH] Use sql table after calling the __setup__ super of marketing parameter It is ModelSQL.__setup__ that fill the _table attribute used in the SQL table. Closes #12773 --- modules/marketing_campaign/marketing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/marketing_campaign/marketing.py b/modules/marketing_campaign/marketing.py index aa18c6c917..f4aa28d6bd 100644 --- a/modules/marketing_campaign/marketing.py +++ b/modules/marketing_campaign/marketing.py @@ -16,8 +16,8 @@ class Parameter(DeactivableMixin, ModelSQL, ModelView): @classmethod def __setup__(cls): - t = cls.__table__() super().__setup__() + t = cls.__table__() cls._sql_constraints += [ ('name_unique', Exclude(t, (Lower(t.name), Equal)), 'marketing_campaign.msg_parameter_name_unique'),