diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-08-16 13:53:29 -0600 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-08-16 13:53:29 -0600 |
commit | 34305c558f8149c96ed2fa331981f70625d7739a (patch) | |
tree | 15cf89d511724c3804c2bb4f78596a21366f5840 | |
parent | 52c62c822eb0ff73eefe1a84bd2704d0a36cea09 (diff) | |
download | askbot-34305c558f8149c96ed2fa331981f70625d7739a.tar.gz askbot-34305c558f8149c96ed2fa331981f70625d7739a.tar.bz2 askbot-34305c558f8149c96ed2fa331981f70625d7739a.zip |
fixed group and tag issue with widget posting
-rw-r--r-- | askbot/views/widgets.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/askbot/views/widgets.py b/askbot/views/widgets.py index 72aac74e..1940eedd 100644 --- a/askbot/views/widgets.py +++ b/askbot/views/widgets.py @@ -46,12 +46,25 @@ def ask_widget(request, widget_id): text = form.cleaned_data['text'] else: text = ' ' + + + if widget.group: + group_id = widget.group.id + else: + group_id = None + + if widget.tag: + tagnames = widget.tag.name + else: + tagnames = '' + data_dict = { 'title': title, 'added_at': datetime.now(), 'wiki': False, 'text': text, - 'tagnames': '', + 'tagnames': tagnames, + 'group_id': group_id, 'is_anonymous': ask_anonymously } if request.user.is_authenticated(): |