From b121fd6fc92c07a77dfe66d29a293d6a46d2a13c Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 17 Jan 2012 13:00:45 +0100 Subject: fix bug ADOBECONNECT-43 --- src/meetingtools/apps/room/views.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index 0eae2f6..ed8c2d6 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -466,12 +466,13 @@ def tag(request,rid): if request.method == 'POST': form = TagRoomForm(request.POST) if form.is_valid(): - tag = form.cleaned_data['tag'] - ok,reason = _can_tag(request,tag) - if ok: - Tag.objects.add_tag(room, tag) - else: - form._errors['tag'] = form.error_class([u'%s ... please choose another tag!' % reason]) + for tag in form.cleaned_data['tag'].split(','): + tag = tag.strip() + ok,reason = _can_tag(request,tag) + if ok: + Tag.objects.add_tag(room, tag) + else: + form._errors['tag'] = form.error_class([u'%s ... please choose another tag!' % reason]) else: form = TagRoomForm() -- cgit v1.1