diff --git a/ui/opensnitch/dialogs/stats.py b/ui/opensnitch/dialogs/stats.py index f7e2b1baef..83e04e2c4f 100644 --- a/ui/opensnitch/dialogs/stats.py +++ b/ui/opensnitch/dialogs/stats.py @@ -1121,7 +1121,7 @@ def _table_menu_duplicate(self, cur_idx, model, selection): if records == None or records.size() == -1: rule = Rule.new_from_records(records) rule.name = "cloned-{0}-{1}".format(idx, rule.name) - self._db.insert_rule(rule, node_addr) + self._rules.add_rules(node_addr, [rule]) break if records != None and records.size() == -1: @@ -1140,7 +1140,7 @@ def _table_menu_apply_to_node(self, cur_idx, model, selection, node_addr): noti = ui_pb2.Notification(type=ui_pb2.CHANGE_RULE, rules=[rule]) nid = self._nodes.send_notification(node_addr, noti, self._notification_callback) if nid != None: - self._db.insert_rule(rule, node_addr) + self._rules.add_rules(node_addr, [rule]) self._notifications_sent[nid] = noti def _table_menu_change_rule_field(self, cur_idx, model, selection, field, value):