Skip to content

Commit

Permalink
Allow overriding the mail instances from the outside
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Nov 17, 2018
1 parent 8a4936c commit 8e0b04f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spark/spark_mails/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def process_mail_events(iterable, *, defaults=None, fail_silently=False):
mail.send(fail_silently=fail_silently)


def mails_from_events(iterable, *, defaults=None):
mails = Mail.objects.as_mails()
def mails_from_events(iterable, *, defaults=None, mails=None):
mails = Mail.objects.as_mails() if mails is None else mails
defaults = {} if defaults is None else defaults

for e in iterable:
Expand Down

0 comments on commit 8e0b04f

Please sign in to comment.