Skip to content

Commit

Permalink
Put the form attrs on the class, not the instance
Browse files Browse the repository at this point in the history
This way we no longer need override the form __init__.
  • Loading branch information
hmpf committed Sep 18, 2024
1 parent c32c939 commit 8779d22
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python/nav/web/seeddb/forms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,7 @@ class RoomFilterForm(forms.Form):
Location.objects.order_by('id').all(), required=False, label_suffix=''
)
location.widget.attrs.update({"class": "select"})

def __init__(self, *args, **kwargs):
super(RoomFilterForm, self).__init__(*args, **kwargs)
self.no_crispy = set_filter_form_attributes('Filter rooms')
no_crispy = set_filter_form_attributes('Filter rooms')


class RoomForm(forms.ModelForm):
Expand Down

0 comments on commit 8779d22

Please sign in to comment.