Skip to content

Commit

Permalink
catch error when looking up text in configuration. this is needed wit…
Browse files Browse the repository at this point in the history
…h the newest `datagridfield` updates.
  • Loading branch information
petschki committed Mar 16, 2023
1 parent 5323fdb commit 298429b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bda/plone/shop/mailnotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def __init__(self, context):

def _lookup_text(self, field):
settings = get_shop_notification_settings()
enum = getattr(settings, field)
enum = getattr(settings, field, None)
if enum is None:
return
portal_state = self.context.restrictedTraverse("@@plone_portal_state")
lang = portal_state.language()
for entry in enum:
Expand Down

0 comments on commit 298429b

Please sign in to comment.