summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-11-10 16:20:23 +0100
committerOlivier Dony <odo@openerp.com>2014-11-10 16:20:23 +0100
commitb8efdbdf395c3f82fa6c8ea483e8fa4d77f0fd2f (patch)
treec0273074942e8e9e871122c30a206929cb9ec029 /addons
parent0d830893985a17f26f734dc8664033cc0c9c5307 (diff)
[FIX] website_forum: avoid access error when closing spam/abuse questions
Logging the user login is not necessary, but accessing it might cause access errors. Logging the UID is equivalent anyway, so let's not bother.
Diffstat (limited to 'addons')
-rw-r--r--addons/website_forum/models/forum.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py
index a9e192c8e65..4c36d68ef29 100644
--- a/addons/website_forum/models/forum.py
+++ b/addons/website_forum/models/forum.py
@@ -393,7 +393,7 @@ class Post(osv.Model):
for post in self.browse(cr, uid, ids, context=context):
if post.closed_reason_id.id in (reason_offensive, reason_spam):
_logger.info('Upvoting user <%s>, reopening spam/offensive question',
- post.create_uid.login)
+ post.create_uid)
# TODO: in master, consider making this a tunable karma parameter
self.pool['res.users'].add_karma(cr, SUPERUSER_ID, [post.create_uid.id],
post.forum_id.karma_gen_question_downvote * -5,
@@ -409,7 +409,7 @@ class Post(osv.Model):
if reason_id in (reason_offensive, reason_spam):
for post in self.browse(cr, uid, ids, context=context):
_logger.info('Downvoting user <%s> for posting spam/offensive contents',
- post.create_uid.login)
+ post.create_uid)
# TODO: in master, consider making this a tunable karma parameter
self.pool['res.users'].add_karma(cr, SUPERUSER_ID, [post.create_uid.id],
post.forum_id.karma_gen_question_downvote * 5,