Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
philippeowagner committed Oct 31, 2013
1 parent 388fd2c commit 3bf60dd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions shop_simplenotifications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ def payment_instructions_email_notification(sender, **kwargs):
if order.user and order.user.email:
emails.append(order.user.email)
if request and get_shipping_address_from_request(request):
emails.append(get_shipping_address_from_request(request).email)
address = get_shipping_address_from_request(request)
if hasattr(address, 'email'):
emails.append(address.email)
if request and get_billing_address_from_request(request):
emails.append(get_billing_address_from_request(request).email)
address = get_billing_address_from_request(request)
if hasattr(address, 'email'):
emails.append(address.email)
emails.append(address.email)

emails = list(set(emails)) # removes duplicated entries
if emails:
Expand Down

0 comments on commit 3bf60dd

Please sign in to comment.