Skip to content

Commit

Permalink
Rename parameter and add type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
podliashanyk committed Nov 8, 2024
1 parent b8fec64 commit ab89d12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/nav/web/seeddb/forms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion python/nav/web/seeddb/page/management_profile/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]
)


Expand Down

0 comments on commit ab89d12

Please sign in to comment.