From 051fffbaa66f9ec812d93e1b9f2ada43dfbde233 Mon Sep 17 00:00:00 2001 From: Johanna England Date: Wed, 13 Nov 2024 14:05:08 +0100 Subject: [PATCH] Remove empty calls to `set_flat_form_attributes` --- python/nav/web/ipdevinfo/forms.py | 2 -- python/nav/web/seeddb/forms/__init__.py | 2 -- python/nav/web/seeddb/page/netbox/forms.py | 2 -- 3 files changed, 6 deletions(-) diff --git a/python/nav/web/ipdevinfo/forms.py b/python/nav/web/ipdevinfo/forms.py index 90c5441aca..b7d2807cee 100644 --- a/python/nav/web/ipdevinfo/forms.py +++ b/python/nav/web/ipdevinfo/forms.py @@ -106,5 +106,3 @@ class BooleanSensorForm(forms.Form): alert_type = forms.ChoiceField( label='What to display in "on" state', choices=Sensor.ALERT_TYPE_CHOICES ) - - attrs = set_flat_form_attributes() diff --git a/python/nav/web/seeddb/forms/__init__.py b/python/nav/web/seeddb/forms/__init__.py index 5bdc5eef0b..4282cc8f22 100644 --- a/python/nav/web/seeddb/forms/__init__.py +++ b/python/nav/web/seeddb/forms/__init__.py @@ -337,8 +337,6 @@ def __init__(self, *args, **kwargs): initial['netboxes'] = [n.pk for n in kwargs['instance'].netboxes.all()] forms.ModelForm.__init__(self, *args, **kwargs) - self.attrs = set_flat_form_attributes() - class Meta(object): model = NetboxGroup fields = '__all__' diff --git a/python/nav/web/seeddb/page/netbox/forms.py b/python/nav/web/seeddb/page/netbox/forms.py index 497cd4b53d..e9cca7ecce 100644 --- a/python/nav/web/seeddb/page/netbox/forms.py +++ b/python/nav/web/seeddb/page/netbox/forms.py @@ -112,8 +112,6 @@ def __init__(self, *args, **kwargs): self.fields['profiles'].widget.attrs.update({'class': 'select2'}) self.fields['groups'].widget.attrs.update({'class': 'select2'}) - self.attrs = set_flat_form_attributes() - def create_instance_query(self, masters): """Creates query for virtual instance multiselect""" # - Should not see other masters