Browse Source

Fix when tariff is none

devel
www-data 8 years ago
parent
commit
c4bf0f3780
  1. 2
      abonapp/models.py

2
abonapp/models.py

@ -263,6 +263,8 @@ class Abon(BaseAccount):
else:
return
abon_tariff = self.active_tariff()
if abon_tariff is None:
return
trf = abon_tariff.tariff
agent_trf = TariffStruct(trf.id, trf.speedIn, trf.speedOut)
return AbonStruct(self.pk, user_ip, agent_trf, bool(self.is_active))

Loading…
Cancel
Save