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
Adding e.g. the option "1,2 m" to a local property gives two options,: "1" and "2 m".
The reason for that behaviour is an undocumented feature in lfs.manage.product.variants.add_property_option():
names = request.POST.get("name").split(",")
position = 999
property_id = request.POST.get("property_id")
for name in names:
...
It is meant to enter several options, e.g. "red,green,blue", in the options field with one click. Using an arbitrary separator like a comma will always end in one or other problem since you never know which character a user might choose.
I propose to remove this feature, i.e. remove the split() and the for loop.
The text was updated successfully, but these errors were encountered:
Adding e.g. the option "1,2 m" to a local property gives two options,: "1" and "2 m".
The reason for that behaviour is an undocumented feature in lfs.manage.product.variants.add_property_option():
names = request.POST.get("name").split(",")
position = 999
property_id = request.POST.get("property_id")
for name in names:
...
It is meant to enter several options, e.g. "red,green,blue", in the options field with one click. Using an arbitrary separator like a comma will always end in one or other problem since you never know which character a user might choose.
I propose to remove this feature, i.e. remove the split() and the for loop.
The text was updated successfully, but these errors were encountered: