From 59b5125a8ec29d9ee6fa61269ef5f868467fa252 Mon Sep 17 00:00:00 2001 From: bashmak Date: Sat, 4 Mar 2017 17:08:57 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=83=D0=B1=D0=B8=D1=80=D0=B0?= =?UTF-8?q?=D0=BB=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- abonapp/models.py | 2 -- agent/structs.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/abonapp/models.py b/abonapp/models.py index c7b80e8..c3f1fb4 100644 --- a/abonapp/models.py +++ b/abonapp/models.py @@ -392,10 +392,8 @@ def abon_post_save(sender, instance, **kwargs): # создаём абонента tm.add_user(agent_abon) else: - print('Update') # обновляем абонента на NAS tm.update_user(agent_abon) - print('PostUpdate', instance.is_active) # если не активен то приостановим услугу if instance.is_active: tm.start_user(agent_abon) diff --git a/agent/structs.py b/agent/structs.py index 408374b..9f444b0 100644 --- a/agent/structs.py +++ b/agent/structs.py @@ -53,8 +53,8 @@ class TariffStruct(BaseStruct): def __init__(self, tariff_id=0, speedIn=None, speedOut=None): self.tid = tariff_id - self.speedIn = float(speedIn or 5.0625) - self.speedOut = float(speedOut or 5.0625) + self.speedIn = speedIn if speedIn is not None else 5.0625 + self.speedOut = speedOut if speedOut is not None else 5.0625 def serialize(self): dt = pack("!Iff", int(self.tid), float(self.speedIn), float(self.speedOut))