Commit 80fe6ce9 authored by Michaël Paulon's avatar Michaël Paulon

On force les numéros de prises à deux chiffres

parent c9fd2e17
......@@ -928,7 +928,7 @@ class RadiusEventHandler(object):
"""Renvoie la chambre associé à un NAS et une prise donnée d'une part
et l'ensemble des adhérents y résidant d'autre part"""
nas_id = nas_id.replace('-', '')
plug = "%s%s" % (nas_id[3:], port)
plug = "%d%02d" % (int(nas_id[3:]), int(port))
logger.debug('Trying to find a match by room (plug %s)', plug)
building, plug_nb = plug[0], plug[1:]
room = reverse(building, plug_nb)
......
Markdown is supported
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