8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-26 08:53:46 +00:00

Simplify, requète inutile

This commit is contained in:
Gabriel Detraz 2017-10-15 21:09:41 +02:00 committed by root
parent 0eeb9685e5
commit 22072ad641

View file

@ -292,7 +292,7 @@ def decide_vlan_and_register_switch(nas, nas_type, port_number, mac_address):
if not port.room: if not port.room:
return (sw_name, u'Chambre inconnue', VLAN_NOK) return (sw_name, u'Chambre inconnue', VLAN_NOK)
room_user = User.objects.filter(room=Room.objects.filter(name=port.room)) room_user = User.objects.filter(room=port.room)
if not room_user: if not room_user:
return (sw_name, u'Chambre non cotisante', VLAN_NOK) return (sw_name, u'Chambre non cotisante', VLAN_NOK)
elif not room_user.first().has_access(): elif not room_user.first().has_access():