From b829c001edae23acd8fe6cf2e123a4a9407a7c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Hol=C3=BD?= Date: Wed, 15 May 2024 01:38:49 +0200 Subject: [PATCH] fix AttributeError: Manager isn't accessible via Payment instances --- HISTORY.rst | 3 +++ payments_payu/provider.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index d814d5b..9bfdb05 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,9 @@ History ------- +Unreleased +********** +* fix "AttributeError: Manager isn't accessible via Payment instances" introduced in 1.4.1 1.4.2 (2024-05-14) ****************** diff --git a/payments_payu/provider.py b/payments_payu/provider.py index 413e85c..1f84a89 100644 --- a/payments_payu/provider.py +++ b/payments_payu/provider.py @@ -598,7 +598,7 @@ def process_notification(self, payment, request): data["order"]["totalAmount"], data["order"]["currencyCode"], ) - payment.objects.filter(pk=payment.pk).update( + type(payment).objects.filter(pk=payment.pk).update( captured_amount=payment.captured_amount ) payment.change_status(status)