Browse Source

Add more readable log if account has no active leases

devel
www-data 8 years ago
parent
commit
6abe058775
  1. 4
      abonapp/locale/ru/LC_MESSAGES/django.po
  2. 4
      abonapp/models.py

4
abonapp/locale/ru/LC_MESSAGES/django.po

@ -211,8 +211,8 @@ msgid "Buy service default log"
msgstr "Покупка тарифного плана через админку"
#: models.py:228
msgid "You have not any active leases"
msgstr "Учётная запись не имеет ни одной активной сессии"
msgid "Account %(username)s not have any active leases"
msgstr "Учётная зап� %(username)s�сь не имеет ни одной активной сессии"
#: models.py:236 models.py:253 models.py:270 views.py:667 views.py:1100
#: views.py:1143

4
abonapp/models.py

@ -225,7 +225,9 @@ class Abon(BaseAccount):
agent_trf = TariffStruct(trf.id, trf.speedIn, trf.speedOut)
if len(abon_addresses) > 0:
return AbonStruct(self.pk, abon_addresses, agent_trf, self.is_access())
raise LogicError(_('You have not any active leases'))
raise LogicError(_('Account "%(username)s" not have any active leases') % {
'username': self.username
})
def nas_sync_self(self) -> Optional[Exception]:
"""

Loading…
Cancel
Save