Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is impossible to add an option containing a comma to a local property #140

Open
jzuschlag opened this issue May 22, 2014 · 1 comment

Comments

@jzuschlag
Copy link
Contributor

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.

@diefenbach
Copy link
Owner

Agreed.

jzuschlag pushed a commit to jzuschlag/django-lfs that referenced this issue May 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants