diff options
author | Leif Johansson <leifj@sunet.se> | 2012-01-17 13:00:45 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-01-17 13:00:45 +0100 |
commit | b121fd6fc92c07a77dfe66d29a293d6a46d2a13c (patch) | |
tree | 17d423e49b64edce4f3a99818c73798e6590ace5 /src/meetingtools | |
parent | 47773eae78862b8346c5f328e0fa6b6cd71f9564 (diff) |
fix bug ADOBECONNECT-43
Diffstat (limited to 'src/meetingtools')
-rw-r--r-- | src/meetingtools/apps/room/views.py | 13 |
1 files changed, 7 insertions, 6 deletions
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() |