Commit 7b2cea7
authored
fix: pack weapons not showing on fighter cards (#1541)
## Summary
- Fix pack weapon profiles being excluded from fighter card display by
using `all_content()` in the `weapon_profiles_field` prefetch
- Fix form validation rejecting pack weapon profiles and upgrades when
adding equipment, by setting `with_packs()` querysets on
`weapon_profiles_field` and `upgrades_field`
## Test plan
- [x] Add a pack weapon with a named profile to a fighter via trading
post — assignment should be created
- [x] Verify the weapon and its profiles appear on the fighter card
- [x] Verify core (non-pack) weapons still work as before
Fixes #1540
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent c8359eb commit 7b2cea7
File tree
3 files changed
+44
-35
lines changed- gyrinx/core
- models
- tests/fixtures
- views/fighter
3 files changed
+44
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1478 | 1478 | | |
1479 | 1479 | | |
1480 | 1480 | | |
1481 | | - | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1482 | 1485 | | |
1483 | 1486 | | |
1484 | 1487 | | |
| |||
0 commit comments