From af69da95d618588be2c9e95074811a326194f2b8 Mon Sep 17 00:00:00 2001 From: Alice Date: Sat, 1 Apr 2017 17:23:47 +0200 Subject: [PATCH] Fix payment models, ignore unused backends --- payments/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/payments/models.py b/payments/models.py index 01bc82c..93879ff 100644 --- a/payments/models.py +++ b/payments/models.py @@ -51,6 +51,9 @@ for cls in BackendBase.__subclasses__(): name = cls.backend_id assert isinstance(name, str) + if name not in backend_settings: + continue + obj = cls(backend_settings.get(name, {})) if not obj.backend_enabled: if name in backend_settings: