Skip to content

Commit

Permalink
Issue diefenbach#140, remove undocumented feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Jo Zuschlag committed May 23, 2014
1 parent b83d2b3 commit ae3ac8c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lfs/manage/product/variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,12 @@ def add_property_option(request, product_id):
"""
property_option_form = PropertyOptionForm(data=request.POST)
if property_option_form.is_valid():
names = request.POST.get("name").split(",")
name = request.POST.get("name")
position = 999
property_id = request.POST.get("property_id")
for name in names:
property_option = PropertyOption(name=name)
property_option.property_id = property_id
property_option.position = position
property_option.save()
position += 1
property_option = PropertyOption(name=name)
property_option.property_id = request.POST.get("property_id")
property_option.position = position
property_option.save()

# Refresh positions
for i, option in enumerate(PropertyOption.objects.filter(property=property_id)):
Expand Down

0 comments on commit ae3ac8c

Please sign in to comment.