Skip to content
Snippets Groups Projects
Commit e1a432d3 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Fix: Try pairing groups by name when updating existing groups. (Redmine issue: #6227)

parent 99398720
No related branches found
No related tags found
No related merge requests found
...@@ -572,10 +572,13 @@ class MentatNetmngrScript(mentat.script.fetcher.FetcherScript): ...@@ -572,10 +572,13 @@ class MentatNetmngrScript(mentat.script.fetcher.FetcherScript):
:param bool status_only: Do not actually perform any database operations, just report status. :param bool status_only: Do not actually perform any database operations, just report status.
""" """
for group_name in sorted(abuse_group_dict.keys()): for group_name in sorted(abuse_group_dict.keys()):
if group_name in wi_file_data: name = None
if group_name in wi_file_data: name = group_name
if abuse_group_dict[group_name].name in wi_file_data: name = abuse_group_dict[group_name].name
if name:
self._group_update_networks( self._group_update_networks(
abuse_group_dict[group_name], abuse_group_dict[group_name],
[network for networks in wi_file_data[group_name].values() for network in networks], [network for networks in wi_file_data[name].values() for network in networks],
result, result,
status_only) status_only)
self.sqlservice.session.commit() self.sqlservice.session.commit()
......
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