Browse Source

В процедуре построения структуры агента не строим ничего если нет услуги

devel
bashmak 9 years ago
parent
commit
9026cc97d3
  1. 4
      abonapp/models.py

4
abonapp/models.py

@ -332,10 +332,10 @@ class Abon(UserProfile):
else: else:
return return
inst_tariff = self.active_tariff() inst_tariff = self.active_tariff()
if inst_tariff:
if inst_tariff is not None:
agent_trf = TariffStruct(inst_tariff.id, inst_tariff.speedIn, inst_tariff.speedOut) agent_trf = TariffStruct(inst_tariff.id, inst_tariff.speedIn, inst_tariff.speedOut)
else: else:
agent_trf = TariffStruct()
agent_trf = None
return AbonStruct(self.pk, user_ip, agent_trf, bool(self.is_active)) return AbonStruct(self.pk, user_ip, agent_trf, bool(self.is_active))
def save(self, *args, **kwargs): def save(self, *args, **kwargs):

Loading…
Cancel
Save