correction erreurs saisie (demenagement depuis chambre vide impossible + affichage membres)

This commit is contained in:
Romain Beuque 2014-05-03 00:01:16 +02:00
parent 1ebaaf8322
commit 9f959080a3
2 changed files with 2 additions and 2 deletions

View File

@ -913,7 +913,7 @@ class RoomChangeMemberController(AuthenticatedRestController):
if room is None:
raise Exception("room inconnue")
if room.get("x-memberIn") is not None and room.get("x-memberIn").first() != 'None':
if room.get("x-memberIn") is not None and room.get("x-memberIn").first() is not None:
memberIn_attribute = Room.memberIn_attr(str(room.get("x-memberIn").first()))
self.user.ldap_bind.delete_attr(room.dn, memberIn_attribute)
print("[LOG] retrait de chambre pour le member "+room.get("x-memberIn").first() +" from "+ room_uid +" by "+self.user.attrs.dn)

View File

@ -41,7 +41,7 @@ class MembersController(AuthenticatedBaseController):
rooms = Room.get_rooms(self.user, residence_dn)
rooms_dict = dict()
for room in rooms:
if room.get("x-memberIn").first is not None:
if room.get("x-memberIn").first() is not None:
rooms_dict[room.get("x-memberIn").first()] = room
#end if
#end for