From 1262559793e2954dd729fb1a78531ed713daf27b Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 26 Oct 2026 14:20:03 +0300 Subject: [PATCH] fix(nwfilters): a rule is deleted and added exactly as clicked and entered - Deleting a rule removes the row clicked, by its position, instead of the first rule with the same action, direction and priority; a filter changed since the page was read is refused instead of losing another rule. - An added rule is added as entered, with all its attributes. It was merged into a rule with the same action, direction and priority, where libvirt keeps only the first protocol, so the new rule was silently dropped. - A new filter shows in the list after it is created. --- nwfilters/templates/add_nwf_rule.html | 1 - nwfilters/templates/nwfilter.html | 1 + nwfilters/tests/test_audit_rows.py | 6 ++-- nwfilters/tests/test_redefine.py | 43 +++++++++++++++++++++-- nwfilters/views.py | 5 ++- vrtManager/nwfilters.py | 49 +++++++++------------------ vrtManager/tests/test_xpath_values.py | 12 +++---- 7 files changed, 71 insertions(+), 46 deletions(-) diff --git a/nwfilters/templates/add_nwf_rule.html b/nwfilters/templates/add_nwf_rule.html index 31da308b..55403877 100644 --- a/nwfilters/templates/add_nwf_rule.html +++ b/nwfilters/templates/add_nwf_rule.html @@ -21,7 +21,6 @@ -

{% trans 'If there is a rule which has same attributes it replaces that rule' %}...