diff --git a/python/nav/web/seeddb/forms/__init__.py b/python/nav/web/seeddb/forms/__init__.py index 1764fd94a7..1b801ce367 100644 --- a/python/nav/web/seeddb/forms/__init__.py +++ b/python/nav/web/seeddb/forms/__init__.py @@ -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): @@ -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):