summaryrefslogtreecommitdiff
path: root/src/meetingtools/apps
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-10-25 10:04:32 +0200
committerLeif Johansson <leifj@sunet.se>2011-10-25 10:04:32 +0200
commitbc5a7f434392732eddc61ab0b0eddd4319a3decf (patch)
treedbda879eaebb9b55f7cda7246b6ccc1f58a35c58 /src/meetingtools/apps
parent5d588a52bdacba1a901bfd1ae0e6f00c6f8742b3 (diff)
test
Diffstat (limited to 'src/meetingtools/apps')
-rw-r--r--src/meetingtools/apps/room/views.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index a97352a..059df69 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -248,14 +248,18 @@ def _import_room(request,acc,r):
room = None
pass
+ logging.debug("+++ after object create")
+ logging.debug(room)
if not room:
return None
+ logging.debug("+++ room timers")
logging.debug(room.lastupdate())
logging.debug(room.lastupdate() - time.time())
if abs(room.lastupdate() - time.time()) < IMPORT_TTL:
return room
-
+
+ logging.debug("+++ looking at user counts")
api = ac_api_client(request,acc)
userlist = api.request('meeting-usermanager-user-list',{'sco-id': room.sco_id},False)
r['user_count'] = 0
@@ -265,7 +269,7 @@ def _import_room(request,acc,r):
r['host_count'] = int(userlist.et.xpath("count(.//userdetails/role[text() = 'host'])"))
modified = True
- logging.debug("----------")
+ logging.debug("+++ room before merge")
logging.debug(pformat(room))
logging.debug(pformat(r))
@@ -279,12 +283,15 @@ def _import_room(request,acc,r):
setattr(room,key,r[key])
modified = True
+ logging.debug("+++ room after merge")
+ logging.debug(pformat(room))
+
if not room.name:
room.delete()
return None
if modified:
- logging.debug("saving ... %s" % pformat(room))
+ logging.debug("+++ saving room ... %s" % pformat(room))
room.save()
return room