Commit 81b7a7c4 authored by chirac's avatar chirac
Browse files

Merge branch 'hotfix_autocreate' into 'dev'

Hotfix autocreate

See merge request federez/re2o!380
parents 2a42a5e4 58ede006
Pipeline #924 failed with stage
......@@ -696,7 +696,8 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
def autoregister_machine(self, mac_address, nas_type):
""" Fonction appellée par freeradius. Enregistre la mac pour
une machine inconnue sur le compte de l'user"""
if Machine.can_create(self):
allowed, _message = Machine.can_create(self,
if not allowed:
return False, _("Maximum number of registered machines reached.")
if not nas_type:
return False, _("Re2o doesn't know wich machine type to assign.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment