diff --git a/agent/mod_mikrotik.py b/agent/mod_mikrotik.py index 469d67f..a29173f 100644 --- a/agent/mod_mikrotik.py +++ b/agent/mod_mikrotik.py @@ -405,7 +405,11 @@ class MikrotikTransmitter(BaseTransmitter, ApiRos, metaclass=type('_ABC_Lazy_mcs def remove_user(self, user: AbonStruct): self.remove_queue(user) - firewall_ip_list_ids = (self.find_ip(ip, LIST_USERS_ALLOWED).get('=.id') for ip in user.ips) + def _finder(ips): + for ip in ips: + r = self.find_ip(ip, LIST_USERS_ALLOWED) + if r: yield r.get('=.id') + firewall_ip_list_ids = _finder(user.ips) self.remove_ip_range(firewall_ip_list_ids) def update_user(self, user: AbonStruct, *args): diff --git a/tariff_app/locale/ru/LC_MESSAGES/django.po b/tariff_app/locale/ru/LC_MESSAGES/django.po index 8815cb3..63a500a 100644 --- a/tariff_app/locale/ru/LC_MESSAGES/django.po +++ b/tariff_app/locale/ru/LC_MESSAGES/django.po @@ -211,3 +211,6 @@ msgstr "Нет подтверждения удаления" msgid "" "Service with this Speed In, Speed Out, Price and Script already exists." msgstr "Услуга с такой скоростью, ценой и логикой уже есть" + +msgid "Users count" +msgstr "Кол. пользователей" \ No newline at end of file diff --git a/tariff_app/templates/tariff_app/tarifs.html b/tariff_app/templates/tariff_app/tarifs.html index 76cd346..c564035 100644 --- a/tariff_app/templates/tariff_app/tarifs.html +++ b/tariff_app/templates/tariff_app/tarifs.html @@ -31,6 +31,7 @@ {% if order_by == 'amount' %}{% endif %} +