Use the latest billing address as the default one

This commit is contained in:
PCoder 2019-12-26 18:54:17 +05:30
commit cbf2f05d70
2 changed files with 2 additions and 2 deletions

View file

@ -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'):