if not created:\r
return\r
\r
- post = instance.content_object\r
+ post = instance.content_object.leaf\r
question = (post.__class__ == Question) and post or post.question\r
\r
- user.reputes.create(value=-int(settings.REP_LOST_BY_FLAGGED), question=question,\r
+ post.author.reputes.create(value=-int(settings.REP_LOST_BY_FLAGGED), question=question,\r
reputation_type=TYPE_REPUTATION_LOST_BY_FLAGGED)\r
\r
\r
\r
def on_vote(instance, created, **kwargs):\r
if created and not instance.content_object.wiki:\r
- post = instance.content_object\r
+ post = instance.content_object.leaf\r
question = (post.__class__ == Question) and post or post.question\r
\r
if instance.vote == -1:\r
\r
def on_vote_canceled(instance, **kwargs):\r
if not instance.content_object.wiki:\r
- post = instance.content_object\r
+ post = instance.content_object.leaf\r
question = (post.__class__ == Question) and post or post.question\r
\r
if instance.vote == -1:\r