Browse Source

fix removing user

devel
Dmitry Novikov 7 years ago
parent
commit
23539e687c
  1. 5
      abonapp/models.py

5
abonapp/models.py

@ -284,8 +284,9 @@ class Abon(BaseAccount):
raise LogicError(_('NAS required')) raise LogicError(_('NAS required'))
try: try:
agent_abon = self.build_agent_struct() agent_abon = self.build_agent_struct()
mngr = self.nas.get_nas_manager()
mngr.remove_user(agent_abon)
if agent_abon is not None:
mngr = self.nas.get_nas_manager()
mngr.remove_user(agent_abon)
except (NasFailedResult, NasNetworkError, ConnectionResetError) as e: except (NasFailedResult, NasNetworkError, ConnectionResetError) as e:
print('ERROR:', e) print('ERROR:', e)
return e return e

Loading…
Cancel
Save