Skip to content

Commit

Permalink
fix: choice formfield choices kwarg (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav authored Jul 5, 2024
1 parent 32a11ce commit ffe6339
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/unfold/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def formfield_for_choice_field(
else:
kwargs["widget"] = UnfoldAdminSelectWidget()

if "choices" not in kwargs:
kwargs["choices"] = db_field.get_choices(
include_blank=db_field.blank, blank_choice=[("", _("Select value"))]
)
Expand Down

0 comments on commit ffe6339

Please sign in to comment.