Skip to content

Filter out null labels in plugin sales SelectFilter options#281

Merged
simonhamp merged 1 commit intomainfrom
fix-select-null-label
Mar 17, 2026
Merged

Filter out null labels in plugin sales SelectFilter options#281
simonhamp merged 1 commit intomainfrom
fix-select-null-label

Conversation

@simonhamp
Copy link
Member

Summary

  • Added whereNotNull query constraints to all three SelectFilter relationship definitions in PluginSalesResource to prevent null labels from being passed to Filament's Select::isOptionDisabled() method
  • Added test coverage for the plugin sales page, including a regression test with a null-name plugin

Problem

When a Plugin record has a null name, the preloaded Select filter options pass null as the label to Select::isOptionDisabled(), which expects a string — causing a ViewException on /admin/plugin-sales.

Fixes #37

Test plan

  • test_plugin_sales_page_renders_when_plugin_has_null_name — verifies the page renders without error when plugins with null names exist
  • test_plugin_sales_page_renders_successfully — verifies general page rendering

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonhamp simonhamp marked this pull request as ready for review March 17, 2026 15:44
@simonhamp simonhamp merged commit 4c4a17d into main Mar 17, 2026
2 checks passed
@simonhamp simonhamp deleted the fix-select-null-label branch March 17, 2026 17:26
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