We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to add a new address on checkout of digital goods


### What I'm trying to achieve

Enter a new billing address on checkout when ordering a digital good.

### Steps to reproduce the problem

1. Make sure you have a default billing address;
1. Add to cart a book;
1. Go to checkout;
1. At billing address step, create a new address with a different country;
1. Correct any errors if the default billing address fields differs from the new country;
1. Place order;
1. Shipping address should not have been created.

### What I expected to happen
Have the new address as billing address on order.

### What happened instead/how it failed
Got no address created, and got the previous address as billing address for order.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `saleor/checkout/views/summary.py`
Content:
```
1 from django.contrib import messages
2 from django.shortcuts import redirect
3 from django.template.response import TemplateResponse
4 from django.utils.translation import pgettext, pgettext_lazy
5 
6 from ...account.forms import get_address_form
7 from ...account.models import Address
8 from ...core.exceptions import InsufficientStock
9 from ...order.emails import send_order_confirmation
10 from ..forms import (
11     AnonymousUserBillingForm, BillingAddressesForm,
12     BillingWithoutShippingAddressForm, NoteForm)
13 
14 
15 def create_order(checkout):
16     """Finalize a checkout session and create an order.
17 
18     This is a helper function.
19 
20     `checkout` is a `saleor.checkout.core.Checkout` instance.
21     """
22     order = checkout.create_order()
23     if not order:
24         return None, redirect('checkout:summary')
25     checkout.clear_storage()
26     checkout.cart.clear()
27     user = None if checkout.user.is_anonymous else checkout.user
28     msg = pgettext_lazy('Order status history entry', 'Order was placed')
29     order.history.create(user=user, content=msg)
30     send_order_confirmation.delay(order.pk)
31     return order, redirect('order:payment', token=order.token)
32 
33 
34 def handle_order_placement(request, checkout):
35     """Try to create an order and redirect the user as necessary.
36 
37     This is a helper function.
38     """
39     try:
40         order, redirect_url = create_order(checkout)
41     except InsufficientStock:
42         return redirect('cart:index')
43     if not order:
44         msg = pgettext('Checkout warning', 'Please review your checkout.')
45         messages.warning(request, msg)
46     return redirect_url
47 
48 
49 def get_billing_forms_with_shipping(
50         data, addresses, billing_address, shipping_address):
51     """Get billing form based on a the current billing and shipping data."""
52     if billing_address == shipping_address:
53         address_form, preview = get_address_form(
54             data, country_code=shipping_address.country.code,
55             autocomplete_type='billing',
56             initial={'country': shipping_address.country.code},
57             instance=None)
58         addresses_form = BillingAddressesForm(
59             data, additional_addresses=addresses, initial={
60                 'address': BillingAddressesForm.SHIPPING_ADDRESS})
61     elif billing_address.id is None:
62         address_form, preview = get_address_form(
63             data, country_code=billing_address.country.code,
64             autocomplete_type='billing',
65             initial={'country': billing_address.country.code},
66             instance=billing_address)
67         addresses_form = BillingAddressesForm(
68             data, additional_addresses=addresses, initial={
69                 'address': BillingAddressesForm.NEW_ADDRESS})
70     else:
71         address_form, preview = get_address_form(
72             data, country_code=billing_address.country.code,
73             autocomplete_type='billing',
74             initial={'country': billing_address.country})
75         addresses_form = BillingAddressesForm(
76             data, additional_addresses=addresses, initial={
77                 'address': billing_address.id})
78     if addresses_form.is_valid() and not preview:
79         address_id = addresses_form.cleaned_data['address']
80         if address_id == BillingAddressesForm.SHIPPING_ADDRESS:
81             return address_form, addresses_form, shipping_address
82         elif address_id != BillingAddressesForm.NEW_ADDRESS:
83             address = addresses.get(id=address_id)
84             return address_form, addresses_form, address
85         elif address_form.is_valid():
86             return address_form, addresses_form, address_form.instance
87     return address_form, addresses_form, None
88 
89 
90 def summary_with_shipping_view(request, checkout):
91     """Display order summary with billing forms for a logged in user.
92 
93     Will create an order if all data is valid.
94     """
95     note_form = NoteForm(request.POST or None, checkout=checkout)
96     if note_form.is_valid():
97         note_form.set_checkout_note()
98 
99     if request.user.is_authenticated:
100         additional_addresses = request.user.addresses.all()
101     else:
102         additional_addresses = Address.objects.none()
103     address_form, addresses_form, address = get_billing_forms_with_shipping(
104         request.POST or None, additional_addresses,
105         checkout.billing_address or Address(country=request.country),
106         checkout.shipping_address)
107     if address is not None:
108         checkout.billing_address = address
109         return handle_order_placement(request, checkout)
110     return TemplateResponse(
111         request, 'checkout/summary.html', context={
112             'addresses_form': addresses_form, 'address_form': address_form,
113             'checkout': checkout,
114             'additional_addresses': additional_addresses,
115             'note_form': note_form})
116 
117 
118 def anonymous_summary_without_shipping(request, checkout):
119     """Display order summary with billing forms for an unauthorized user.
120 
121     Will create an order if all data is valid.
122     """
123     note_form = NoteForm(request.POST or None, checkout=checkout)
124     if note_form.is_valid():
125         note_form.set_checkout_note()
126     user_form = AnonymousUserBillingForm(
127         request.POST or None, initial={'email': checkout.email})
128     billing_address = checkout.billing_address
129     if billing_address:
130         address_form, preview = get_address_form(
131             request.POST or None, country_code=billing_address.country.code,
132             autocomplete_type='billing', instance=billing_address)
133     else:
134         address_form, preview = get_address_form(
135             request.POST or None, country_code=request.country.code,
136             autocomplete_type='billing', initial={'country': request.country})
137     if all([user_form.is_valid(), address_form.is_valid()]) and not preview:
138         checkout.email = user_form.cleaned_data['email']
139         checkout.billing_address = address_form.instance
140         return handle_order_placement(request, checkout)
141     return TemplateResponse(
142         request, 'checkout/summary_without_shipping.html', context={
143             'user_form': user_form, 'address_form': address_form,
144             'checkout': checkout,
145             'note_form': note_form})
146 
147 
148 def summary_without_shipping(request, checkout):
149     """Display order summary for cases where shipping is not required.
150 
151     Will create an order if all data is valid.
152     """
153     note_form = NoteForm(request.POST or None, checkout=checkout)
154     if note_form.is_valid():
155         note_form.set_checkout_note()
156 
157     billing_address = checkout.billing_address
158     user_addresses = request.user.addresses.all()
159     if billing_address and billing_address.id:
160         address_form, preview = get_address_form(
161             request.POST or None, autocomplete_type='billing',
162             initial={'country': request.country},
163             country_code=billing_address.country.code,
164             instance=billing_address)
165         addresses_form = BillingWithoutShippingAddressForm(
166             request.POST or None, additional_addresses=user_addresses,
167             initial={'address': billing_address.id})
168     elif billing_address:
169         address_form, preview = get_address_form(
170             request.POST or None, autocomplete_type='billing',
171             instance=billing_address,
172             country_code=billing_address.country.code)
173         addresses_form = BillingWithoutShippingAddressForm(
174             request.POST or None, additional_addresses=user_addresses)
175     else:
176         address_form, preview = get_address_form(
177             request.POST or None, autocomplete_type='billing',
178             initial={'country': request.country},
179             country_code=request.country.code)
180         addresses_form = BillingWithoutShippingAddressForm(
181             request.POST or None, additional_addresses=user_addresses)
182 
183     if addresses_form.is_valid():
184         address_id = addresses_form.cleaned_data['address']
185         if address_id != BillingWithoutShippingAddressForm.NEW_ADDRESS:
186             checkout.billing_address = user_addresses.get(id=address_id)
187             return handle_order_placement(request, checkout)
188         elif address_form.is_valid() and not preview:
189             checkout.billing_address = address_form.instance
190             return handle_order_placement(request, checkout)
191     return TemplateResponse(
192         request, 'checkout/summary_without_shipping.html', context={
193             'addresses_form': addresses_form, 'address_form': address_form,
194             'checkout': checkout, 'additional_addresses': user_addresses,
195             'note_form': note_form})
196
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.py
--- a/saleor/checkout/views/summary.py
+++ b/saleor/checkout/views/summary.py
@@ -160,8 +160,7 @@
         address_form, preview = get_address_form(
             request.POST or None, autocomplete_type='billing',
             initial={'country': request.country},
-            country_code=billing_address.country.code,
-            instance=billing_address)
+            country_code=billing_address.country.code)
         addresses_form = BillingWithoutShippingAddressForm(
             request.POST or None, additional_addresses=user_addresses,
             initial={'address': billing_address.id})

{"golden_diff": "diff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.py\n--- a/saleor/checkout/views/summary.py\n+++ b/saleor/checkout/views/summary.py\n@@ -160,8 +160,7 @@\n         address_form, preview = get_address_form(\n             request.POST or None, autocomplete_type='billing',\n             initial={'country': request.country},\n-            country_code=billing_address.country.code,\n-            instance=billing_address)\n+            country_code=billing_address.country.code)\n         addresses_form = BillingWithoutShippingAddressForm(\n             request.POST or None, additional_addresses=user_addresses,\n             initial={'address': billing_address.id})\n", "issue": "Unable to add a new address on checkout of digital goods\n\r\n\r\n### What I'm trying to achieve\r\n\r\nEnter a new billing address on checkout when ordering a digital good.\r\n\r\n### Steps to reproduce the problem\r\n\r\n1. Make sure you have a default billing address;\r\n1. Add to cart a book;\r\n1. Go to checkout;\r\n1. At billing address step, create a new address with a different country;\r\n1. Correct any errors if the default billing address fields differs from the new country;\r\n1. Place order;\r\n1. Shipping address should not have been created.\r\n\r\n### What I expected to happen\r\nHave the new address as billing address on order.\r\n\r\n### What happened instead/how it failed\r\nGot no address created, and got the previous address as billing address for order.\r\n\n", "before_files": [{"content": "from django.contrib import messages\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.utils.translation import pgettext, pgettext_lazy\n\nfrom ...account.forms import get_address_form\nfrom ...account.models import Address\nfrom ...core.exceptions import InsufficientStock\nfrom ...order.emails import send_order_confirmation\nfrom ..forms import (\n    AnonymousUserBillingForm, BillingAddressesForm,\n    BillingWithoutShippingAddressForm, NoteForm)\n\n\ndef create_order(checkout):\n    \"\"\"Finalize a checkout session and create an order.\n\n    This is a helper function.\n\n    `checkout` is a `saleor.checkout.core.Checkout` instance.\n    \"\"\"\n    order = checkout.create_order()\n    if not order:\n        return None, redirect('checkout:summary')\n    checkout.clear_storage()\n    checkout.cart.clear()\n    user = None if checkout.user.is_anonymous else checkout.user\n    msg = pgettext_lazy('Order status history entry', 'Order was placed')\n    order.history.create(user=user, content=msg)\n    send_order_confirmation.delay(order.pk)\n    return order, redirect('order:payment', token=order.token)\n\n\ndef handle_order_placement(request, checkout):\n    \"\"\"Try to create an order and redirect the user as necessary.\n\n    This is a helper function.\n    \"\"\"\n    try:\n        order, redirect_url = create_order(checkout)\n    except InsufficientStock:\n        return redirect('cart:index')\n    if not order:\n        msg = pgettext('Checkout warning', 'Please review your checkout.')\n        messages.warning(request, msg)\n    return redirect_url\n\n\ndef get_billing_forms_with_shipping(\n        data, addresses, billing_address, shipping_address):\n    \"\"\"Get billing form based on a the current billing and shipping data.\"\"\"\n    if billing_address == shipping_address:\n        address_form, preview = get_address_form(\n            data, country_code=shipping_address.country.code,\n            autocomplete_type='billing',\n            initial={'country': shipping_address.country.code},\n            instance=None)\n        addresses_form = BillingAddressesForm(\n            data, additional_addresses=addresses, initial={\n                'address': BillingAddressesForm.SHIPPING_ADDRESS})\n    elif billing_address.id is None:\n        address_form, preview = get_address_form(\n            data, country_code=billing_address.country.code,\n            autocomplete_type='billing',\n            initial={'country': billing_address.country.code},\n            instance=billing_address)\n        addresses_form = BillingAddressesForm(\n            data, additional_addresses=addresses, initial={\n                'address': BillingAddressesForm.NEW_ADDRESS})\n    else:\n        address_form, preview = get_address_form(\n            data, country_code=billing_address.country.code,\n            autocomplete_type='billing',\n            initial={'country': billing_address.country})\n        addresses_form = BillingAddressesForm(\n            data, additional_addresses=addresses, initial={\n                'address': billing_address.id})\n    if addresses_form.is_valid() and not preview:\n        address_id = addresses_form.cleaned_data['address']\n        if address_id == BillingAddressesForm.SHIPPING_ADDRESS:\n            return address_form, addresses_form, shipping_address\n        elif address_id != BillingAddressesForm.NEW_ADDRESS:\n            address = addresses.get(id=address_id)\n            return address_form, addresses_form, address\n        elif address_form.is_valid():\n            return address_form, addresses_form, address_form.instance\n    return address_form, addresses_form, None\n\n\ndef summary_with_shipping_view(request, checkout):\n    \"\"\"Display order summary with billing forms for a logged in user.\n\n    Will create an order if all data is valid.\n    \"\"\"\n    note_form = NoteForm(request.POST or None, checkout=checkout)\n    if note_form.is_valid():\n        note_form.set_checkout_note()\n\n    if request.user.is_authenticated:\n        additional_addresses = request.user.addresses.all()\n    else:\n        additional_addresses = Address.objects.none()\n    address_form, addresses_form, address = get_billing_forms_with_shipping(\n        request.POST or None, additional_addresses,\n        checkout.billing_address or Address(country=request.country),\n        checkout.shipping_address)\n    if address is not None:\n        checkout.billing_address = address\n        return handle_order_placement(request, checkout)\n    return TemplateResponse(\n        request, 'checkout/summary.html', context={\n            'addresses_form': addresses_form, 'address_form': address_form,\n            'checkout': checkout,\n            'additional_addresses': additional_addresses,\n            'note_form': note_form})\n\n\ndef anonymous_summary_without_shipping(request, checkout):\n    \"\"\"Display order summary with billing forms for an unauthorized user.\n\n    Will create an order if all data is valid.\n    \"\"\"\n    note_form = NoteForm(request.POST or None, checkout=checkout)\n    if note_form.is_valid():\n        note_form.set_checkout_note()\n    user_form = AnonymousUserBillingForm(\n        request.POST or None, initial={'email': checkout.email})\n    billing_address = checkout.billing_address\n    if billing_address:\n        address_form, preview = get_address_form(\n            request.POST or None, country_code=billing_address.country.code,\n            autocomplete_type='billing', instance=billing_address)\n    else:\n        address_form, preview = get_address_form(\n            request.POST or None, country_code=request.country.code,\n            autocomplete_type='billing', initial={'country': request.country})\n    if all([user_form.is_valid(), address_form.is_valid()]) and not preview:\n        checkout.email = user_form.cleaned_data['email']\n        checkout.billing_address = address_form.instance\n        return handle_order_placement(request, checkout)\n    return TemplateResponse(\n        request, 'checkout/summary_without_shipping.html', context={\n            'user_form': user_form, 'address_form': address_form,\n            'checkout': checkout,\n            'note_form': note_form})\n\n\ndef summary_without_shipping(request, checkout):\n    \"\"\"Display order summary for cases where shipping is not required.\n\n    Will create an order if all data is valid.\n    \"\"\"\n    note_form = NoteForm(request.POST or None, checkout=checkout)\n    if note_form.is_valid():\n        note_form.set_checkout_note()\n\n    billing_address = checkout.billing_address\n    user_addresses = request.user.addresses.all()\n    if billing_address and billing_address.id:\n        address_form, preview = get_address_form(\n            request.POST or None, autocomplete_type='billing',\n            initial={'country': request.country},\n            country_code=billing_address.country.code,\n            instance=billing_address)\n        addresses_form = BillingWithoutShippingAddressForm(\n            request.POST or None, additional_addresses=user_addresses,\n            initial={'address': billing_address.id})\n    elif billing_address:\n        address_form, preview = get_address_form(\n            request.POST or None, autocomplete_type='billing',\n            instance=billing_address,\n            country_code=billing_address.country.code)\n        addresses_form = BillingWithoutShippingAddressForm(\n            request.POST or None, additional_addresses=user_addresses)\n    else:\n        address_form, preview = get_address_form(\n            request.POST or None, autocomplete_type='billing',\n            initial={'country': request.country},\n            country_code=request.country.code)\n        addresses_form = BillingWithoutShippingAddressForm(\n            request.POST or None, additional_addresses=user_addresses)\n\n    if addresses_form.is_valid():\n        address_id = addresses_form.cleaned_data['address']\n        if address_id != BillingWithoutShippingAddressForm.NEW_ADDRESS:\n            checkout.billing_address = user_addresses.get(id=address_id)\n            return handle_order_placement(request, checkout)\n        elif address_form.is_valid() and not preview:\n            checkout.billing_address = address_form.instance\n            return handle_order_placement(request, checkout)\n    return TemplateResponse(\n        request, 'checkout/summary_without_shipping.html', context={\n            'addresses_form': addresses_form, 'address_form': address_form,\n            'checkout': checkout, 'additional_addresses': user_addresses,\n            'note_form': note_form})\n", "path": "saleor/checkout/views/summary.py"}], "after_files": [{"content": "from django.contrib import messages\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.utils.translation import pgettext, pgettext_lazy\n\nfrom ...account.forms import get_address_form\nfrom ...account.models import Address\nfrom ...core.exceptions import InsufficientStock\nfrom ...order.emails import send_order_confirmation\nfrom ..forms import (\n    AnonymousUserBillingForm, BillingAddressesForm,\n    BillingWithoutShippingAddressForm, NoteForm)\n\n\ndef create_order(checkout):\n    \"\"\"Finalize a checkout session and create an order.\n\n    This is a helper function.\n\n    `checkout` is a `saleor.checkout.core.Checkout` instance.\n    \"\"\"\n    order = checkout.create_order()\n    if not order:\n        return None, redirect('checkout:summary')\n    checkout.clear_storage()\n    checkout.cart.clear()\n    user = None if checkout.user.is_anonymous else checkout.user\n    msg = pgettext_lazy('Order status history entry', 'Order was placed')\n    order.history.create(user=user, content=msg)\n    send_order_confirmation.delay(order.pk)\n    return order, redirect('order:payment', token=order.token)\n\n\ndef handle_order_placement(request, checkout):\n    \"\"\"Try to create an order and redirect the user as necessary.\n\n    This is a helper function.\n    \"\"\"\n    try:\n        order, redirect_url = create_order(checkout)\n    except InsufficientStock:\n        return redirect('cart:index')\n    if not order:\n        msg = pgettext('Checkout warning', 'Please review your checkout.')\n        messages.warning(request, msg)\n    return redirect_url\n\n\ndef get_billing_forms_with_shipping(\n        data, addresses, billing_address, shipping_address):\n    \"\"\"Get billing form based on a the current billing and shipping data.\"\"\"\n    if billing_address == shipping_address:\n        address_form, preview = get_address_form(\n            data, country_code=shipping_address.country.code,\n            autocomplete_type='billing',\n            initial={'country': shipping_address.country.code},\n            instance=None)\n        addresses_form = BillingAddressesForm(\n            data, additional_addresses=addresses, initial={\n                'address': BillingAddressesForm.SHIPPING_ADDRESS})\n    elif billing_address.id is None:\n        address_form, preview = get_address_form(\n            data, country_code=billing_address.country.code,\n            autocomplete_type='billing',\n            initial={'country': billing_address.country.code},\n            instance=billing_address)\n        addresses_form = BillingAddressesForm(\n            data, additional_addresses=addresses, initial={\n                'address': BillingAddressesForm.NEW_ADDRESS})\n    else:\n        address_form, preview = get_address_form(\n            data, country_code=billing_address.country.code,\n            autocomplete_type='billing',\n            initial={'country': billing_address.country})\n        addresses_form = BillingAddressesForm(\n            data, additional_addresses=addresses, initial={\n                'address': billing_address.id})\n    if addresses_form.is_valid() and not preview:\n        address_id = addresses_form.cleaned_data['address']\n        if address_id == BillingAddressesForm.SHIPPING_ADDRESS:\n            return address_form, addresses_form, shipping_address\n        elif address_id != BillingAddressesForm.NEW_ADDRESS:\n            address = addresses.get(id=address_id)\n            return address_form, addresses_form, address\n        elif address_form.is_valid():\n            return address_form, addresses_form, address_form.instance\n    return address_form, addresses_form, None\n\n\ndef summary_with_shipping_view(request, checkout):\n    \"\"\"Display order summary with billing forms for a logged in user.\n\n    Will create an order if all data is valid.\n    \"\"\"\n    note_form = NoteForm(request.POST or None, checkout=checkout)\n    if note_form.is_valid():\n        note_form.set_checkout_note()\n\n    if request.user.is_authenticated:\n        additional_addresses = request.user.addresses.all()\n    else:\n        additional_addresses = Address.objects.none()\n    address_form, addresses_form, address = get_billing_forms_with_shipping(\n        request.POST or None, additional_addresses,\n        checkout.billing_address or Address(country=request.country),\n        checkout.shipping_address)\n    if address is not None:\n        checkout.billing_address = address\n        return handle_order_placement(request, checkout)\n    return TemplateResponse(\n        request, 'checkout/summary.html', context={\n            'addresses_form': addresses_form, 'address_form': address_form,\n            'checkout': checkout,\n            'additional_addresses': additional_addresses,\n            'note_form': note_form})\n\n\ndef anonymous_summary_without_shipping(request, checkout):\n    \"\"\"Display order summary with billing forms for an unauthorized user.\n\n    Will create an order if all data is valid.\n    \"\"\"\n    note_form = NoteForm(request.POST or None, checkout=checkout)\n    if note_form.is_valid():\n        note_form.set_checkout_note()\n    user_form = AnonymousUserBillingForm(\n        request.POST or None, initial={'email': checkout.email})\n    billing_address = checkout.billing_address\n    if billing_address:\n        address_form, preview = get_address_form(\n            request.POST or None, country_code=billing_address.country.code,\n            autocomplete_type='billing', instance=billing_address)\n    else:\n        address_form, preview = get_address_form(\n            request.POST or None, country_code=request.country.code,\n            autocomplete_type='billing', initial={'country': request.country})\n    if all([user_form.is_valid(), address_form.is_valid()]) and not preview:\n        checkout.email = user_form.cleaned_data['email']\n        checkout.billing_address = address_form.instance\n        return handle_order_placement(request, checkout)\n    return TemplateResponse(\n        request, 'checkout/summary_without_shipping.html', context={\n            'user_form': user_form, 'address_form': address_form,\n            'checkout': checkout,\n            'note_form': note_form})\n\n\ndef summary_without_shipping(request, checkout):\n    \"\"\"Display order summary for cases where shipping is not required.\n\n    Will create an order if all data is valid.\n    \"\"\"\n    note_form = NoteForm(request.POST or None, checkout=checkout)\n    if note_form.is_valid():\n        note_form.set_checkout_note()\n\n    billing_address = checkout.billing_address\n    user_addresses = request.user.addresses.all()\n    if billing_address and billing_address.id:\n        address_form, preview = get_address_form(\n            request.POST or None, autocomplete_type='billing',\n            initial={'country': request.country},\n            country_code=billing_address.country.code)\n        addresses_form = BillingWithoutShippingAddressForm(\n            request.POST or None, additional_addresses=user_addresses,\n            initial={'address': billing_address.id})\n    elif billing_address:\n        address_form, preview = get_address_form(\n            request.POST or None, autocomplete_type='billing',\n            instance=billing_address,\n            country_code=billing_address.country.code)\n        addresses_form = BillingWithoutShippingAddressForm(\n            request.POST or None, additional_addresses=user_addresses)\n    else:\n        address_form, preview = get_address_form(\n            request.POST or None, autocomplete_type='billing',\n            initial={'country': request.country},\n            country_code=request.country.code)\n        addresses_form = BillingWithoutShippingAddressForm(\n            request.POST or None, additional_addresses=user_addresses)\n\n    if addresses_form.is_valid():\n        address_id = addresses_form.cleaned_data['address']\n        if address_id != BillingWithoutShippingAddressForm.NEW_ADDRESS:\n            checkout.billing_address = user_addresses.get(id=address_id)\n            return handle_order_placement(request, checkout)\n        elif address_form.is_valid() and not preview:\n            checkout.billing_address = address_form.instance\n            return handle_order_placement(request, checkout)\n    return TemplateResponse(\n        request, 'checkout/summary_without_shipping.html', context={\n            'addresses_form': addresses_form, 'address_form': address_form,\n            'checkout': checkout, 'additional_addresses': user_addresses,\n            'note_form': note_form})\n", "path": "saleor/checkout/views/summary.py"}]}