Commit 4d5bb5a
Fix "selected user is invalid" when granting bundle to user with null name (#388)
Filament's Select uses getOptionLabelUsing to validate the chosen value;
returning a blank label causes the "in" rule to reject it. The bundle
grant action returned `User->name`, which is null for some users.
Use `getFilamentName()` so the label falls back through display_name,
name, then email, ensuring a non-blank result for any existing user.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d00591c commit 4d5bb5a
2 files changed
Lines changed: 23 additions & 2 deletions
File tree
- app/Filament/Resources
- tests/Feature/Filament
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
54 | 75 | | |
0 commit comments