From cb3089ff57c6efc5fa3a939c304f680da69334a7 Mon Sep 17 00:00:00 2001 From: Peter Mathis Date: Tue, 16 Apr 2024 15:08:58 +0200 Subject: [PATCH] catch missing payment_text entry --- src/bda/plone/shop/mailnotify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bda/plone/shop/mailnotify.py b/src/bda/plone/shop/mailnotify.py index 50dc70d..8bb6434 100644 --- a/src/bda/plone/shop/mailnotify.py +++ b/src/bda/plone/shop/mailnotify.py @@ -142,7 +142,7 @@ def __init__(self, context): def payment_text(self, payment): settings = get_shop_payment_settings() lang = api.portal.get_current_language() - for entry in settings.payment_text: + for entry in (settings.payment_text or []): if entry["lang"] == lang and entry["payment"] == payment: return entry["text"] return ""