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

Remove promotion_code from adjustment_attributes #2663

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

gevann
Copy link

@gevann gevann commented Mar 29, 2018

Adjustments do not have an attribute called 'promotion_code'.

@@ -133,7 +133,7 @@ def required_fields_for(model)

@@adjustment_attributes = [
:id, :source_type, :source_id, :adjustable_type, :adjustable_id,
:amount, :label, :promotion_code,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a promotion_code_id on Spree::Adjustments. Maybe it's better to update that attribute instead of removing it?

@gevann gevann force-pushed the correct-adjustment-attributes branch from 91147a6 to 60487d5 Compare April 3, 2018 16:37
Adjustments do not have an attribute called 'promotion_code'. The
resulting JSON will always return NULL. This commits changes the
adjustment_attributes to instead reference the 'promotion_code_id'.
@gevann gevann force-pushed the correct-adjustment-attributes branch from 60487d5 to 09a2c17 Compare April 3, 2018 20:37
@gevann
Copy link
Author

gevann commented Apr 3, 2018

Requested changes have been made, thanks 😄

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gmacdougall gmacdougall merged commit 0cebb4d into solidusio:master Apr 12, 2018
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.

4 participants