Validate VAT number only if it is set
This commit is contained in:
parent
3b654f1c49
commit
b15ece7088
1 changed files with 16 additions and 14 deletions
|
@ -542,6 +542,8 @@ class PaymentOrderView(FormView):
|
|||
else:
|
||||
request.session['customer'] = customer
|
||||
|
||||
vat_number = address_form.cleaned_data.get('vat_number').strip()
|
||||
if vat_number:
|
||||
validate_result = validate_vat_number(
|
||||
stripe_customer_id=request.session['customer'],
|
||||
vat_number=address_form.cleaned_data.get('vat_number')
|
||||
|
|
Loading…
Reference in a new issue