From d2b65abe25b05e360ba3acd9e8624ed4014370a1 Mon Sep 17 00:00:00 2001 From: Julie Rymer Date: Tue, 23 Apr 2024 16:14:31 +0200 Subject: [PATCH] fix: prevent insert error when creating deferred transaction by using sane default value --- src/oscar/apps/payment/abstract_models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/oscar/apps/payment/abstract_models.py b/src/oscar/apps/payment/abstract_models.py index 8e64f1fa16..cee55ac720 100644 --- a/src/oscar/apps/payment/abstract_models.py +++ b/src/oscar/apps/payment/abstract_models.py @@ -136,9 +136,7 @@ def save(self, *args, **kwargs): for txn in self.deferred_txns: self._create_transaction(*txn) - def create_deferred_transaction( - self, txn_type, amount, reference=None, status=None - ): + def create_deferred_transaction(self, txn_type, amount, reference="", status=""): """ Register the data for a transaction that can't be created yet due to FK constraints. This happens at checkout where create an payment source