X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=influences%2Fnotify.py;h=6aae6f28bb0cfb5548032d7cddc4f5566d38f97f;hb=884bf66b55546555bfd3df318b9318e8358b02cf;hp=3b5d874b5239a6e05390307b5449c41edc867d9a;hpb=208bc91fbcd12576310cb405f0a713f14429b2a1;p=matthijs%2Fprojects%2Fxerxes.git diff --git a/influences/notify.py b/influences/notify.py index 3b5d874..6aae6f2 100644 --- a/influences/notify.py +++ b/influences/notify.py @@ -20,9 +20,13 @@ 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) + def comment_saved(**kwargs): if (settings.DEBUG): return