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))