summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/models/__init__.py13
-rw-r--r--askbot/views/users.py2
2 files changed, 9 insertions, 6 deletions
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index 6a957265..bdd1c681 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -2485,15 +2485,18 @@ def user_approve_post_revision(user, post_revision, timestamp = None):
)
@auto_now_timestamp
-def flag_post(user, post, timestamp=None, cancel=False, cancel_all = False, force = False):
+def flag_post(
+ user, post, timestamp=None, cancel=False, cancel_all=False, force=False
+):
if cancel_all:
# remove all flags
if force == False:
- user.assert_can_remove_all_flags_offensive(post = post)
+ user.assert_can_remove_all_flags_offensive(post=post)
post_content_type = ContentType.objects.get_for_model(post)
all_flags = Activity.objects.filter(
- activity_type = const.TYPE_ACTIVITY_MARK_OFFENSIVE,
- content_type = post_content_type, object_id=post.id
+ activity_type=const.TYPE_ACTIVITY_MARK_OFFENSIVE,
+ content_type=post_content_type,
+ object_id=post.id
)
for flag in all_flags:
auth.onUnFlaggedItem(post, flag.user, timestamp=timestamp)
@@ -2505,7 +2508,7 @@ def flag_post(user, post, timestamp=None, cancel=False, cancel_all = False, forc
else:
if force == False:
- user.assert_can_flag_offensive(post = post)
+ user.assert_can_flag_offensive(post=post)
auth.onFlaggedItem(post, user, timestamp=timestamp)
award_badges_signal.send(None,
event = 'flag_post',
diff --git a/askbot/views/users.py b/askbot/views/users.py
index d76712e6..031c1003 100644
--- a/askbot/views/users.py
+++ b/askbot/views/users.py
@@ -749,7 +749,7 @@ def user_responses(request, user, context):
'active_tab':'users',
'page_class': 'user-profile-page',
'tab_name' : 'inbox',
- 'inbox_section':section,
+ 'inbox_section': section,
'tab_description' : _('comments and answers to others questions'),
'page_title' : _('profile - responses'),
'post_reject_reasons': reject_reasons,