Make a proper list of recipients in the influence_saved notification.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sat, 31 Jan 2009 13:22:28 +0000 (14:22 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sat, 31 Jan 2009 13:22:28 +0000 (14:22 +0100)
influences/notify.py

index 2e719de41c6f83b539d5a9daa4f4c5c78f0685f9..3b5d874b5239a6e05390307b5449c41edc867d9a 100644 (file)
@@ -17,9 +17,11 @@ signals.post_save.connect(character_saved, sender=Character)
 def influence_saved(**kwargs):
     instance = kwargs['instance']
     created  = kwargs['created']
+    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?
-        notify([instance.related_players.keys(), 'lextalionis@evolution-events.nl'], 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
+        notify(recipients, 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
 
 def comment_saved(**kwargs):
     if (settings.DEBUG):