Cédric Krier pushed to branch branch/default at Tryton / Tryton


Commits:
c3ad06a9 by Cédric Krier at 2023-03-16T17:13:34+01:00
Do not create marketing parameter when context value is an empty string

Closes #12145
- - - - -


1 changed file:

- modules/marketing_campaign/marketing.py


Changes:

=====================================
modules/marketing_campaign/marketing.py
=====================================
@@ -108,7 +108,9 @@
         default = super().default_get(
             fields_names, with_rec_name=with_rec_name)
         for fname in cls.marketing_campaign_fields():
-            if isinstance(context.get(fname), str) and not default.get(fname):
+            if (isinstance(context.get(fname), str)
+                    and context[fname]
+                    and not default.get(fname)):
                 field = getattr(cls, fname)
                 Target = field.get_target()
                 target = Target.from_name(



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/c3ad06a9ac25f378aebaf93489ad2a68302f77b5

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/c3ad06a9ac25f378aebaf93489ad2a68302f77b5
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to