prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Bug: Unable to update Warehouse address
  ### What are you trying to achieve?
  
  I'm trying to update the warehouse update, with the country set to "UK", according to addressValidationRules query, the required fields are 
  ```
  streetAddress1",
  "city",
  "postalCode"
  ```
  
  ### Steps to reproduce the problem
  
  1. In shipping zone update/creating a new on select country UK
  2. Fill all fields with the necessary information
  3. Try to save changes
  
  ### What did you expect to happen?
  
  Being able to update the warehouse address properly.
  
  ### Logs
  
  Api responds with error -> Error code REQUIRED on field countryAreaAPI
  
  ### Environment
  
  Saleor version: 3.10
  
  
  --- 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/account/forms.py`
  Content:
  ```
  1 from phonenumbers.phonenumberutil import country_code_for_region
  2 
  3 from .i18n import AddressMetaForm, get_address_form_class
  4 
  5 
  6 def get_address_form(
  7     data, country_code, initial=None, instance=None, enable_normalization=True, **kwargs
  8 ):
  9     country_form = AddressMetaForm(data, initial=initial)
  10     if country_form.is_valid():
  11         country_code = country_form.cleaned_data["country"]
  12 
  13     if initial is None and country_code:
  14         initial = {}
  15     if country_code:
  16         initial["phone"] = "+{}".format(country_code_for_region(country_code))
  17 
  18     address_form_class = get_address_form_class(country_code)
  19 
  20     if instance is not None:
  21         address_form_class = get_address_form_class(instance.country.code)
  22         address_form = address_form_class(
  23             data, instance=instance, enable_normalization=enable_normalization, **kwargs
  24         )
  25     else:
  26         initial_address = initial
  27         address_form = address_form_class(
  28             data or None,
  29             initial=initial_address,
  30             enable_normalization=enable_normalization,
  31             **kwargs,
  32         )
  33 
  34     if hasattr(address_form.fields["country_area"], "choices"):
  35         choices = address_form.fields["country_area"].choices
  36         choices = [(choice[1], choice[1]) for choice in choices]
  37         address_form.fields["country_area"].choices = choices
  38     return address_form
  39
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/saleor/account/forms.py b/saleor/account/forms.py
  --- a/saleor/account/forms.py
  +++ b/saleor/account/forms.py
  @@ -14,11 +14,9 @@
           initial = {}
       if country_code:
           initial["phone"] = "+{}".format(country_code_for_region(country_code))
  -
       address_form_class = get_address_form_class(country_code)
   
       if instance is not None:
  -        address_form_class = get_address_form_class(instance.country.code)
           address_form = address_form_class(
               data, instance=instance, enable_normalization=enable_normalization, **kwargs
           )
  
verification_info: {"golden_diff": "diff --git a/saleor/account/forms.py b/saleor/account/forms.py\n--- a/saleor/account/forms.py\n+++ b/saleor/account/forms.py\n@@ -14,11 +14,9 @@\n         initial = {}\n     if country_code:\n         initial[\"phone\"] = \"+{}\".format(country_code_for_region(country_code))\n-\n     address_form_class = get_address_form_class(country_code)\n \n     if instance is not None:\n-        address_form_class = get_address_form_class(instance.country.code)\n         address_form = address_form_class(\n             data, instance=instance, enable_normalization=enable_normalization, **kwargs\n         )\n", "issue": "Bug: Unable to update Warehouse address\n### What are you trying to achieve?\n\nI'm trying to update the warehouse update, with the country set to \"UK\", according to addressValidationRules query, the required fields are \r\n```\r\nstreetAddress1\",\r\n\"city\",\r\n\"postalCode\"\r\n```\n\n### Steps to reproduce the problem\n\n1. In shipping zone update/creating a new on select country UK\r\n2. Fill all fields with the necessary information\r\n3. Try to save changes\n\n### What did you expect to happen?\n\nBeing able to update the warehouse address properly.\n\n### Logs\n\nApi responds with error -> Error code REQUIRED on field countryAreaAPI\n\n### Environment\n\nSaleor version: 3.10\r\n\n", "before_files": [{"content": "from phonenumbers.phonenumberutil import country_code_for_region\n\nfrom .i18n import AddressMetaForm, get_address_form_class\n\n\ndef get_address_form(\n    data, country_code, initial=None, instance=None, enable_normalization=True, **kwargs\n):\n    country_form = AddressMetaForm(data, initial=initial)\n    if country_form.is_valid():\n        country_code = country_form.cleaned_data[\"country\"]\n\n    if initial is None and country_code:\n        initial = {}\n    if country_code:\n        initial[\"phone\"] = \"+{}\".format(country_code_for_region(country_code))\n\n    address_form_class = get_address_form_class(country_code)\n\n    if instance is not None:\n        address_form_class = get_address_form_class(instance.country.code)\n        address_form = address_form_class(\n            data, instance=instance, enable_normalization=enable_normalization, **kwargs\n        )\n    else:\n        initial_address = initial\n        address_form = address_form_class(\n            data or None,\n            initial=initial_address,\n            enable_normalization=enable_normalization,\n            **kwargs,\n        )\n\n    if hasattr(address_form.fields[\"country_area\"], \"choices\"):\n        choices = address_form.fields[\"country_area\"].choices\n        choices = [(choice[1], choice[1]) for choice in choices]\n        address_form.fields[\"country_area\"].choices = choices\n    return address_form\n", "path": "saleor/account/forms.py"}], "after_files": [{"content": "from phonenumbers.phonenumberutil import country_code_for_region\n\nfrom .i18n import AddressMetaForm, get_address_form_class\n\n\ndef get_address_form(\n    data, country_code, initial=None, instance=None, enable_normalization=True, **kwargs\n):\n    country_form = AddressMetaForm(data, initial=initial)\n    if country_form.is_valid():\n        country_code = country_form.cleaned_data[\"country\"]\n\n    if initial is None and country_code:\n        initial = {}\n    if country_code:\n        initial[\"phone\"] = \"+{}\".format(country_code_for_region(country_code))\n    address_form_class = get_address_form_class(country_code)\n\n    if instance is not None:\n        address_form = address_form_class(\n            data, instance=instance, enable_normalization=enable_normalization, **kwargs\n        )\n    else:\n        initial_address = initial\n        address_form = address_form_class(\n            data or None,\n            initial=initial_address,\n            enable_normalization=enable_normalization,\n            **kwargs,\n        )\n\n    if hasattr(address_form.fields[\"country_area\"], \"choices\"):\n        choices = address_form.fields[\"country_area\"].choices\n        choices = [(choice[1], choice[1]) for choice in choices]\n        address_form.fields[\"country_area\"].choices = choices\n    return address_form\n", "path": "saleor/account/forms.py"}]}