Merge branch 'production'
[matthijs/projects/xerxes.git] / influences / notify.py
index d53ab36a51a9dd6377ec85c487ac62e68a3a6aac..6aae6f28bb0cfb5548032d7cddc4f5566d38f97f 100644 (file)
@@ -20,7 +20,9 @@ def influence_saved(**kwargs):
     recipients = ['lextalionis@evolution-events.nl']
     recipients.extend(instance.related_players.keys())
     if (not settings.DEBUG):
-        # TODO: Perhaps only notify when the status is / becomes Done?
+        recipients = ['lextalionis@evolution-events.nl']
+        if instance.status == 'D':
+            recipients.append(instance.character.player)
         notify(recipients, 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
 
 signals.post_save.connect(influence_saved, sender=Influence)