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

Use correct model in ProductCrossSellFormSet #869

Merged
merged 1 commit into from Oct 26, 2016
Merged

Use correct model in ProductCrossSellFormSet #869

merged 1 commit into from Oct 26, 2016

Conversation

aahonen19
Copy link
Contributor

ProductCrossSellFormSet is using wrong model in ProductCrossSellEditView, which can cause errors in some shops. Change ProductCrossSellFormSet model to use ProductCrossSell instead of ProductMedia model.

Now when trying to delete a product from product's cross-sell, form errors are:
[{'id': ['Select a valid choice. That choice is not one of the available choices.']}, {'id': ['Select a valid choice. That choice is not one of the available choices.']},... and nothing happens. After I changed to use ProductCrossSell model everything works correct.

@anders-jenkins
Copy link

Can one of the admins verify this patch?

@tulimaki
Copy link
Contributor

ok to test

@tulimaki
Copy link
Contributor

products/views/edit_cross_sell.py Imports are incorrectly sorted.

ProductCrossSellFormSet is using wrong model which can cause errors in some shops.
Change formset to use ProductCrossSell model instead of ProductMedia model.
@tulimaki tulimaki merged commit 9340e70 into shuup:master Oct 26, 2016
@aahonen19 aahonen19 deleted the product-cross-sell-editview-formset-fix branch August 8, 2017 12:12
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

Successfully merging this pull request may close these issues.

None yet

3 participants