Check vat_validation_status exists in dict before using it
This commit is contained in:
parent
5fe1c21b57
commit
9212c02cd7
1 changed files with 2 additions and 1 deletions
|
@ -617,7 +617,8 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
|
|
||||||
if ('generic_payment_type' in request.session and
|
if ('generic_payment_type' in request.session and
|
||||||
self.request.session['generic_payment_type'] == 'generic'):
|
self.request.session['generic_payment_type'] == 'generic'):
|
||||||
if (request.session["vat_validation_status"] == "verified" or
|
if "vat_validation_status" in request.session and (
|
||||||
|
request.session["vat_validation_status"] == "verified" or
|
||||||
request.session["vat_validation_status"] == "not_needed"):
|
request.session["vat_validation_status"] == "not_needed"):
|
||||||
request.session['generic_payment_details']['vat_rate'] = 0
|
request.session['generic_payment_details']['vat_rate'] = 0
|
||||||
request.session['generic_payment_details']['vat_amount'] = 0
|
request.session['generic_payment_details']['vat_amount'] = 0
|
||||||
|
|
Loading…
Reference in a new issue