Skip to content

Commit

Permalink
[FIX] website_sale: reset tx in session if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Yelizariev committed Feb 18, 2019
1 parent 5a6c523 commit cf09c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/website_sale/models/sale_order.py
Expand Up @@ -488,7 +488,7 @@ def sale_get_transaction(self):
# - Be redirected to SIPS website again => error
# Since there is no link module between 'website_sale' and 'payment_sips', we prevent
# here to reuse any previous transaction for SIPS.
if transaction.state != 'cancel' and transaction.acquirer_id.provider != 'sips':
if transaction.exists() and transaction.state != 'cancel' and transaction.acquirer_id.provider != 'sips':
return transaction
else:
request.session['sale_transaction_id'] = False
Expand Down

0 comments on commit cf09c5f

Please sign in to comment.