Product-model-refactor branch - Price Change with Option Group not working

Create issue
Issue #93 resolved
Chris Drew created an issue

Using the changeset [539] on the product model refactor branch, I can't get the price change option to work properly in the admin interface.

If I go into Change Option group and try to enter a price for an option item, it does not get saved.

Existing prices entered from the sample data work fine but if I try to change one of the values, nothing gets saved.

I haven't looked into why it's not getting saved but wanted to capture the issue while it's fresh on my mind.

Comments (3)

  1. Former user Account Deleted

    Wouldn't something like this be more appropriate?

    class Meta: unique_together = (("optionGroup", "value"),)

  2. Chris Moffitt repo owner

    I think the problem is in the save method for the option.

        def save(self):
            #Combination of optionGroup and value must be unique
            if Option.objects.filter(optionGroup=self.optionGroup, value=self.value).count():

    If the price is being modified, it's exiting without saving.

  3. Log in to comment