Skip to content

Commit

Permalink
Merge pull request #89 from sahilgupta/fix_moderation_signal
Browse files Browse the repository at this point in the history
Post moderation signal should send the updated instance. Thank you @sahilgupta good job!
  • Loading branch information
dominno committed Nov 16, 2013
2 parents b357fec + 8e3a8af commit b23e038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moderation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def has_object_been_changed(self, original_obj, fields_exclude=None):
return False

def approve(self, moderated_by=None, reason=None):
pre_moderation.send(sender=self.content_object.__class__,
pre_moderation.send(sender=self.changed_object.__class__,
instance=self.changed_object,
status=MODERATION_STATUS_APPROVED)

Expand All @@ -203,7 +203,7 @@ def approve(self, moderated_by=None, reason=None):
status=MODERATION_STATUS_APPROVED)

def reject(self, moderated_by=None, reason=None):
pre_moderation.send(sender=self.content_object.__class__,
pre_moderation.send(sender=self.changed_object.__class__,
instance=self.changed_object,
status=MODERATION_STATUS_REJECTED)
self._moderate(MODERATION_STATUS_REJECTED, moderated_by, reason)
Expand Down

0 comments on commit b23e038

Please sign in to comment.