From 6e632469445c03695d3ad7f52c5804403e27b3a7 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 10 Jan 2012 13:47:15 +0100 Subject: handle error and fix tag bug --- src/meetingtools/apps/room/views.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/meetingtools/apps/room') 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 -- cgit v1.1