From ab89d12fe66d6b0954963c190bf62d2d219c01ec Mon Sep 17 00:00:00 2001 From: Ilona Podliashanyk Date: Fri, 8 Nov 2024 16:25:29 +0100 Subject: [PATCH] Rename parameter and add type hint --- python/nav/web/seeddb/forms/__init__.py | 4 ++-- python/nav/web/seeddb/page/management_profile/forms.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/nav/web/seeddb/forms/__init__.py b/python/nav/web/seeddb/forms/__init__.py index e2170eef9a..54befbe69c 100644 --- a/python/nav/web/seeddb/forms/__init__.py +++ b/python/nav/web/seeddb/forms/__init__.py @@ -129,7 +129,7 @@ def cut_branch(field, klass, pk): # non-crispy helpers -def get_single_layout(heading, row): +def get_single_layout(heading, filter_fields: list): """Get default layout for a single filter""" return set_flat_form_attributes( form_class="custom", @@ -140,7 +140,7 @@ def get_single_layout(heading, row): fields=[ FormRow( fields=[ - FormColumn(fields=[row], css_classes="medium-8"), + FormColumn(fields=filter_fields, css_classes="medium-8"), FormColumn( fields=[ SubmitField( diff --git a/python/nav/web/seeddb/page/management_profile/forms.py b/python/nav/web/seeddb/page/management_profile/forms.py index 4c27665584..c6904ed9ac 100644 --- a/python/nav/web/seeddb/page/management_profile/forms.py +++ b/python/nav/web/seeddb/page/management_profile/forms.py @@ -32,7 +32,7 @@ def __init__(self, *args, **kwargs): super(ManagementProfileFilterForm, self).__init__(*args, **kwargs) self.attrs = get_single_layout( - heading="Filter connection profiles", row=self["protocol"] + heading="Filter connection profiles", filter_fields=[self["protocol"]] )