Skip to content

Fix collection weapon awakening_level errors#355

Open
jedmund wants to merge 2 commits into
mainfrom
jedmund/fix-collection-errors
Open

Fix collection weapon awakening_level errors#355
jedmund wants to merge 2 commits into
mainfrom
jedmund/fix-collection-errors

Conversation

@jedmund
Copy link
Copy Markdown
Owner

@jedmund jedmund commented Mar 23, 2026

Summary

  • Fix awakening_level null errors when editing collection weapons (both "not included in the list" and PG::NotNullViolation)
  • Add before_validation callback to reset awakening_level to 1 when awakening is cleared, on both CollectionWeapon and GridWeapon
  • Add descriptive validation messages to CollectionWeapon inclusion validators
  • Tests for the callback behavior and validation messages

Test plan

  • bundle exec rspec spec/models/collection_weapon_spec.rb spec/models/grid_weapon_spec.rb
  • Edit a collection weapon with an awakening-capable series, change only uncap level — should succeed

jedmund added 2 commits March 23, 2026 03:00
add before_validation callback to reset awakening_level to 1 when
awakening is cleared. add descriptive validation messages.
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.

1 participant