From ef2101e0c512dd0ac65bc6c36fad4381c89e4ec6 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 7 Aug 2018 17:22:21 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20des=20erreurs,=20et=20am=C3=A9liore=20la?= =?UTF-8?q?=20lisibilit=C3=A9=20des=20logs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freeradius_utils/auth.py | 2 +- freeradius_utils/freeradius3/mods-enabled/python | 2 +- topologie/models.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/freeradius_utils/auth.py b/freeradius_utils/auth.py index 023448d1..afa834b0 100644 --- a/freeradius_utils/auth.py +++ b/freeradius_utils/auth.py @@ -348,7 +348,7 @@ def decide_vlan_and_register_switch(nas_machine, nas_type, port_number, if not nas_machine: return ('?', u'Chambre inconnue', u'Nas inconnu', VLAN_OK) - sw_name = str(nas_machine) + sw_name = str(getattr(nas_machine, 'short_name', str(nas_machine))) port = (Port.objects .filter( diff --git a/freeradius_utils/freeradius3/mods-enabled/python b/freeradius_utils/freeradius3/mods-enabled/python index 414860a3..d4e99f35 100644 --- a/freeradius_utils/freeradius3/mods-enabled/python +++ b/freeradius_utils/freeradius3/mods-enabled/python @@ -9,7 +9,7 @@ python re2o { module = auth - python_path = /etc/freeradius/3.0:/usr/lib/python2.7/:/usr/lib/python2.7/dist-packages/:/usr/local/lib/python2.7/site-packages/:/usr/local/lib/python2.7/dist-packages/ + python_path = /etc/freeradius/3.0:/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/site-packages:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages mod_instantiate = ${.module} func_instantiate = instantiate diff --git a/topologie/models.py b/topologie/models.py index a0333d46..89b3e6a9 100644 --- a/topologie/models.py +++ b/topologie/models.py @@ -427,7 +427,7 @@ class Port(AclMixin, RevMixin, models.Model): :returns: the profile of self (port)""" def profile_or_nothing(profile): port_profile = PortProfile.objects.filter( - profile_default=profile).first() + profil_default=profile).first() if port_profile: return port_profile else: