Skip to content

Commit

Permalink
fix: TypeError: type 'ForeignKey' is not subscriptable (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikbullo committed May 25, 2023
1 parent b274dc6 commit baeec5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unfold/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def formfield_for_choice_field(
return super().formfield_for_choice_field(db_field, request, **kwargs)

def formfield_for_foreignkey(
self, db_field: ForeignKey[Any], request: HttpRequest, **kwargs
self, db_field: ForeignKey, request: HttpRequest, **kwargs
) -> Optional[ModelChoiceField]:
# Overrides widgets for all related fields
if "widget" not in kwargs:
Expand Down

0 comments on commit baeec5d

Please sign in to comment.