Skip to content

Commit

Permalink
use hasattr in example email submission
Browse files Browse the repository at this point in the history
  • Loading branch information
bigmassa committed Jun 15, 2018
1 parent be60ca4 commit b137216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/wagtailstreamforms_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def email_submission(instance, form):
""" Send an email with the submission. """

if not instance.advanced_settings:
if not hasattr(instance, 'advanced_settings'):
return

addresses = [instance.advanced_settings.to_address]
Expand Down

0 comments on commit b137216

Please sign in to comment.