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

Fix setting default value of ingredients #2257

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Mar 9, 2022

What is this pull request for?

Somehow before_validation is not called ever during creating an element and its ingredients.

Using after_initialize fixes this.

Closes #2189

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen added this to the 6.0 milestone Mar 9, 2022
@tvdeyen tvdeyen requested a review from a team March 9, 2022 20:55
@tvdeyen tvdeyen force-pushed the fix-ingredient-default-value branch from bad8c54 to ed77912 Compare March 9, 2022 21:04
Somehow before_validation is not called ever during creating an element and its ingredients.

Using after_initialize fixes this.

Closes AlchemyCMS#2189
@tvdeyen tvdeyen force-pushed the fix-ingredient-default-value branch from ed77912 to 4d72863 Compare March 9, 2022 21:12
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

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

Nice

@tvdeyen tvdeyen merged commit 7e7fe68 into AlchemyCMS:main Mar 10, 2022
@tvdeyen tvdeyen deleted the fix-ingredient-default-value branch March 10, 2022 11:06
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.

Ingredient#default_value not applied on create
2 participants