Skip to content

Commit

Permalink
La notificación de nuevos compromisos se mandan si en el config le po…
Browse files Browse the repository at this point in the history
…nimos que aparezcan
  • Loading branch information
Felipe Álvarez committed Sep 27, 2017
1 parent 6808695 commit 2e01cb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion popular_proposal/forms/forms.py
Expand Up @@ -408,7 +408,8 @@ def save(self):
commitment = Commitment.objects.create(proposal=self.proposal,
candidate=self.candidate,
commited=self.commited)
send_mails_to_staff({'commitment': commitment}, 'notify_staff_new_commitment')
if config.NOTIFY_STAFF_OF_NEW_COMMITMENT:
send_mails_to_staff({'commitment': commitment}, 'notify_staff_new_commitment')
return commitment

def clean(self):
Expand Down
1 change: 1 addition & 0 deletions votainteligente/votainteligente_settings.py
Expand Up @@ -404,6 +404,7 @@
'PROPOSALS_ENABLED' : (True, 'Habilitar propuestas'),
'WHEN_TO_NOTIFY': ('25, 50, 100, 150, 200', 'Cuando notificar'),
'NOTIFY_CANDIDATES': (True, 'Notificar a los candidatos'),
'NOTIFY_STAFF_OF_NEW_COMMITMENT': (True, 'Notificar al staff si es que hay un nuevo compromiso'),
'NOTIFY_CANDIDATES_OF_NEW_PROPOSAL': (True, 'Notificar a los candidatos por una nueva propuesta'),
'NO_REPLY_MAIL': ("no-reply@localhost", 'Cuenta email de envio de correos'),
'EMAIL_LOCALPART': ("municipales2016", 'Cuenta email localhost'),
Expand Down

0 comments on commit 2e01cb1

Please sign in to comment.