You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
Steps to reproduce:
This has to do with selecting attribute with multi options selected. Select more than one attribute values on the multi attribute. This behaviour does not always happen, maybe it depends on the configuration on the product template.
Current behavior:
When debugging on get_form_vals method , The value of the dynamic_field is
The first iteration of for k, v in dynamic_fields.iteritems(): yields k equals to __attribute-42 and v equals_to [[6, False, []]]
The second iteration of for k, v in dynamic_fields.iteritems(): yields k equals to __attribute-39 and v equals_to [[6, False, [2727]]]
Strangely k equals to __attribute_39 appears again at the next iteration but this time with the v equals to [2727] in which accessing v[0][2] will produces an error of TypeError: 'int' object has no attribute '__getitem__'. What causes this key to appear again in the next iteration? My suspicion is that it is caused by dynamic_fields.update({k: value_ids}), after i postponed the update process to take place after the iteritems() is completed, things are working without any problems. @PCatinean can you please explain more about this method?
Expected behavior:
No errors occurred.
Video/Screenshot link (optional):
N/A
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Impacted versions:
8.0
Steps to reproduce:
This has to do with selecting attribute with multi options selected. Select more than one attribute values on the multi attribute. This behaviour does not always happen, maybe it depends on the configuration on the product template.
Current behavior:
When debugging on get_form_vals method , The value of the dynamic_field is
The first iteration of
for k, v in dynamic_fields.iteritems():
yieldsk equals to __attribute-42
andv equals_to [[6, False, []]]
The second iteration of
for k, v in dynamic_fields.iteritems():
yieldsk equals to __attribute-39
andv equals_to [[6, False, [2727]]]
Strangely
k equals to __attribute_39
appears again at the next iteration but this time with thev equals to [2727]
in which accessingv[0][2]
will produces an error ofTypeError: 'int' object has no attribute '__getitem__'
. What causes this key to appear again in the next iteration? My suspicion is that it is caused bydynamic_fields.update({k: value_ids})
, after i postponed the update process to take place after the iteritems() is completed, things are working without any problems. @PCatinean can you please explain more about this method?Expected behavior:
No errors occurred.
Video/Screenshot link (optional):
N/A
The text was updated successfully, but these errors were encountered: