Skip to content

Commit

Permalink
fix: prevent insert error when creating deferred transaction by using…
Browse files Browse the repository at this point in the history
… sane default value
  • Loading branch information
Julie Rymer committed Apr 23, 2024
1 parent 992e1c6 commit d2b65ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/oscar/apps/payment/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2b65ab

Please sign in to comment.