Skip to content

Commit

Permalink
Remove __init__ methods
Browse files Browse the repository at this point in the history
Co-authored-by: podliashanyk <[email protected]>
  • Loading branch information
johannaengland and podliashanyk authored Oct 11, 2024
1 parent b4db6dc commit ef20131
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions python/nav/web/seeddb/forms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ class RoomFilterForm(forms.Form):
Location.objects.order_by('id').all(), required=False
)
location.widget.attrs.update({"class": "select"})

def __init__(self, *args, **kwargs):
super(RoomFilterForm, self).__init__(*args, **kwargs)
self.attrs = get_single_layout(heading="Filter rooms", row=self["location"])
attrs = get_single_layout(heading="Filter rooms", row=[location])


class RoomForm(forms.ModelForm):
Expand Down Expand Up @@ -287,10 +284,7 @@ class NetboxTypeFilterForm(forms.Form):
"""Form for filtering a netbox type by vendor"""

vendor = forms.ModelChoiceField(Vendor.objects.order_by('id').all(), required=False)

def __init__(self, *args, **kwargs):
super(NetboxTypeFilterForm, self).__init__(*args, **kwargs)
self.attrs = get_single_layout(heading="Filter types", row=self["vendor"])
attrs = get_single_layout(heading="Filter types", row=[vendor])


class NetboxTypeForm(forms.ModelForm):
Expand Down

0 comments on commit ef20131

Please sign in to comment.