diff options
author | Leif Johansson <leifj@sunet.se> | 2012-01-10 13:47:15 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-01-10 13:47:15 +0100 |
commit | 6e632469445c03695d3ad7f52c5804403e27b3a7 (patch) | |
tree | 546910cbddcb7894e6cffab5b5c94eb0d7603dfc /src/meetingtools/apps/room | |
parent | dc8aeeb6ceb22b9477d844b78eb5d7c61bdb56ec (diff) |
handle error and fix tag bug
Diffstat (limited to 'src/meetingtools/apps/room')
-rw-r--r-- | src/meetingtools/apps/room/views.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index aa08d9e..b2c3e13 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -272,6 +272,9 @@ def _import_room(request,acc,r): room = None pass + if not room: + return None + 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) @@ -442,7 +445,7 @@ def list_by_tag(request,tn): 'edit':False, 'active':len(rooms) == 1, 'baseurl': BASE_URL, - 'tags': tn, + 'tagstring': tn, 'rooms':rooms}) def widget(request,tags=None): @@ -482,9 +485,11 @@ def tag(request,rid): else: form = TagRoomForm() + tags = Tag.objects.get_for_object(room) + tn = "+".join([t.name for t in tags]) return respond_to(request, {'text/html': "apps/room/tag.html"}, - {'form': form,'formtitle': 'Add Tag','cancelname':'Done','submitname': 'Add Tag','room': room, 'tags': Tag.objects.get_for_object(room)}) + {'form': form,'formtitle': 'Add Tag','cancelname':'Done','submitname': 'Add Tag','room': room, 'tagstring': tn,'tags': tags}) from time import mktime |