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


Commits:
8a7cf1f4 by Cédric Krier at 2023-02-18T18:11:40+01:00
Ensure only existing field names are in default value of ModelStorage.copy

Closes #3535
- - - - -


1 changed file:

- trytond/trytond/model/modelstorage.py


Changes:

=====================================
trytond/trytond/model/modelstorage.py
=====================================
@@ -424,6 +424,8 @@
             if (not isinstance(f, fields.Function)
                 or isinstance(f, fields.MultiValue))
             and n not in mptt]
+        assert (
+            {k.split('.', 1)[0] for k in default.keys()} <= set(fields_names))
         ids = list(map(int, records))
         with without_check_access():
             values = {



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

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


Reply via email to