Skip to content

Commit

Permalink
Keep the thread pinned until after the karma action is saved. [bug 67…
Browse files Browse the repository at this point in the history
…1542]
  • Loading branch information
rlr committed Jul 14, 2011
1 parent 222022e commit 761bb15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/questions/tasks.py
Expand Up @@ -79,9 +79,10 @@ def log_answer(answer):
action.users.add(*users)

transaction.commit_unless_managed()
unpin_this_thread()

# Record karma actions
AnswerAction(answer.creator, answer.created.date()).save()
if answer == answer.question.answers.order_by('created')[0]:
FirstAnswerAction(answer.creator, answer.created.date()).save()

unpin_this_thread()

0 comments on commit 761bb15

Please sign in to comment.