From 62df3789685731cca2e60b972f560221cf313e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Tue, 17 Mar 2020 08:47:20 +0100 Subject: [PATCH] fix wallet in Django>=2.2 --- payments/wallet/widgets.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/payments/wallet/widgets.py b/payments/wallet/widgets.py index f689c514f..3093b60d7 100644 --- a/payments/wallet/widgets.py +++ b/payments/wallet/widgets.py @@ -19,5 +19,8 @@ def __init__(self, provider, payment, *args, **kwargs): @property def media(self): media = super(WalletWidget, self).media - media._js = self.js + try: # Django < 2.2 + media._js = self.js + except AttributeError: + media._js_lists = [self.js] return media