Use the latest billing address as the default one
This commit is contained in:
parent
9e87fa76c3
commit
cbf2f05d70
2 changed files with 2 additions and 2 deletions
|
@ -254,7 +254,7 @@ class PaymentOrderView(FormView):
|
|||
)
|
||||
else:
|
||||
billing_address_form = BillingAddressForm(
|
||||
instance=self.request.user.billing_addresses.first()
|
||||
instance=self.request.user.billing_addresses.order_by('-id').first()
|
||||
)
|
||||
user = self.request.user
|
||||
if hasattr(user, 'stripecustomer'):
|
||||
|
|
|
@ -626,7 +626,7 @@ class SettingsView(LoginRequiredMixin, FormView):
|
|||
'user': self.request.user.id
|
||||
})
|
||||
billing_address_user_form = UserBillingAddressForm(
|
||||
instance=self.request.user.billing_addresses.first(),
|
||||
instance=self.request.user.billing_addresses.order_by('-id').first(),
|
||||
data=billing_address_data)
|
||||
billing_address = billing_address_user_form.save()
|
||||
billing_address.stripe_tax_id = ''
|
||||
|
|
Loading…
Reference in a new issue