Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Make code compatible with older Python versions
dominik-zeglen2e901ef8effb
diff --git a/saleor/dashboard/product/chips.py b/saleor/dashboard/product/chips.pyindex 3d236b5af8..e23cc59047 100644--- a/saleor/dashboard/product/chips.py+++ b/saleor/dashboard/product/chips.py@@ -9,6 +9,15 @@ def find_type_in_list(needle, haystack):return matches[0] if len(matches) else 'default'+def concat_dicts(a, b):+ output = {}+ for key in a.keys():+ output[key] = a[key]+ for key in b.keys():+ output[key] = b[key]+ return output++def handle_default(field, chips, context):in_context = field.name in context.keys()value = context[field.name][str(field.value())] if in_context else field.value()@@ -58,7 +67,7 @@ class ChipFactory:self.chips = []self.context = contextself.form = form- self.handlers = {**DEFAULT_HANDLERS, **handlers}+ self.handlers = concat_dicts(DEFAULT_HANDLERS, handlers)def make(self):for field in self.form: