Skip to content
Snippets Groups Projects
Commit 6bdeeb65 authored by Jakub Judiny's avatar Jakub Judiny
Browse files

Renamed 'ips' to 'sources' in BaseFilterForm

(Redmine issue: #7612)
parent 7f510bf5
No related branches found
No related tags found
No related merge requests found
......@@ -78,11 +78,11 @@ def process_rule(item):
if item.categories:
rules.append('Category IN ["{}"]'.format('","'.join(item.categories)))
if item.ips:
if item.sources:
ip4s = []
ip6s = []
rule_ip4 = rule_ip6 = None
for ipa in item.ips:
for ipa in item.sources:
ipobj = ipranges.from_str(ipa)
if isinstance(ipobj, (ipranges.IP4, ipranges.IP4Range, ipranges.IP4Net)):
ip4s.append(ipa)
......
......@@ -131,7 +131,7 @@ class BaseFilterForm(hawat.forms.BaseItemForm):
choices=[('', lazy_gettext('<< no preference >>'))],
filters=[lambda x: x or []]
)
ips = hawat.forms.CommaListField(
sources = hawat.forms.CommaListField(
lazy_gettext('Source IPs:'),
validators=[
wtforms.validators.Optional(),
......
......@@ -35,7 +35,7 @@
{{ macros_form.render_form_item_select(form.categories) }}
{{ macros_form.render_form_item_default(form.ips) }}
{{ macros_form.render_form_item_default(form.sources) }}
</fieldset>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment