Skip to content

Commit

Permalink
Update formfield_for_dbfield signature (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
frnhr committed Jul 13, 2024
1 parent b36ebec commit 0b2bc4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nested_admin/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class SortableHiddenMixin:

sortable_field_name = "position"

def formfield_for_dbfield(self, db_field, **kwargs):
def formfield_for_dbfield(self, db_field, request, **kwargs):
if db_field.name == self.sortable_field_name:
kwargs["widget"] = HiddenInput()
return super().formfield_for_dbfield(db_field, **kwargs)
return super().formfield_for_dbfield(db_field, request, **kwargs)

0 comments on commit 0b2bc4f

Please sign in to comment.