prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Select2 on disposition view shows error alert
  Closing the select2 field in the disposition view without selecting an entry (e.g. by typing something into the field an then clicking somewhere outside the field) also triggers the form submission. This fails because no valid user has been selected and consequently shows an ugly alert to the user.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `ephios/core/context.py`
  Content:
  ```
  1 import importlib
  2 
  3 from django.conf import settings
  4 from django.templatetags.static import static
  5 from django.utils.translation import get_language
  6 
  7 from ephios.core.models import AbstractParticipation
  8 from ephios.core.signals import footer_link
  9 
  10 # suggested in https://github.com/python-poetry/poetry/issues/273
  11 EPHIOS_VERSION = "v" + importlib.metadata.version("ephios")
  12 
  13 
  14 def ephios_base_context(request):
  15     footer = {}
  16     for _, result in footer_link.send(None, request=request):
  17         for label, url in result.items():
  18             footer[label] = url
  19 
  20     datatables_translation_url = None
  21     if get_language() == "de-de":
  22         datatables_translation_url = static("datatables/german.json")
  23 
  24     return {
  25         "ParticipationStates": AbstractParticipation.States,
  26         "footer": footer,
  27         "datatables_translation_url": datatables_translation_url,
  28         "ephios_version": EPHIOS_VERSION,
  29         "SITE_URL": settings.SITE_URL,
  30         "PWA_APP_ICONS": settings.PWA_APP_ICONS,
  31     }
  32
  ```
  --- 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/ephios/core/context.py b/ephios/core/context.py
  --- a/ephios/core/context.py
  +++ b/ephios/core/context.py
  @@ -1,7 +1,6 @@
   import importlib
   
   from django.conf import settings
  -from django.templatetags.static import static
   from django.utils.translation import get_language
   
   from ephios.core.models import AbstractParticipation
  @@ -17,14 +16,10 @@
           for label, url in result.items():
               footer[label] = url
   
  -    datatables_translation_url = None
  -    if get_language() == "de-de":
  -        datatables_translation_url = static("datatables/german.json")
  -
       return {
           "ParticipationStates": AbstractParticipation.States,
           "footer": footer,
  -        "datatables_translation_url": datatables_translation_url,
  +        "LANGUAGE_CODE": get_language(),
           "ephios_version": EPHIOS_VERSION,
           "SITE_URL": settings.SITE_URL,
           "PWA_APP_ICONS": settings.PWA_APP_ICONS,
  
verification_info: {"golden_diff": "diff --git a/ephios/core/context.py b/ephios/core/context.py\n--- a/ephios/core/context.py\n+++ b/ephios/core/context.py\n@@ -1,7 +1,6 @@\n import importlib\n \n from django.conf import settings\n-from django.templatetags.static import static\n from django.utils.translation import get_language\n \n from ephios.core.models import AbstractParticipation\n@@ -17,14 +16,10 @@\n         for label, url in result.items():\n             footer[label] = url\n \n-    datatables_translation_url = None\n-    if get_language() == \"de-de\":\n-        datatables_translation_url = static(\"datatables/german.json\")\n-\n     return {\n         \"ParticipationStates\": AbstractParticipation.States,\n         \"footer\": footer,\n-        \"datatables_translation_url\": datatables_translation_url,\n+        \"LANGUAGE_CODE\": get_language(),\n         \"ephios_version\": EPHIOS_VERSION,\n         \"SITE_URL\": settings.SITE_URL,\n         \"PWA_APP_ICONS\": settings.PWA_APP_ICONS,\n", "issue": "Select2 on disposition view shows error alert\nClosing the select2 field in the disposition view without selecting an entry (e.g. by typing something into the field an then clicking somewhere outside the field) also triggers the form submission. This fails because no valid user has been selected and consequently shows an ugly alert to the user.\n", "before_files": [{"content": "import importlib\n\nfrom django.conf import settings\nfrom django.templatetags.static import static\nfrom django.utils.translation import get_language\n\nfrom ephios.core.models import AbstractParticipation\nfrom ephios.core.signals import footer_link\n\n# suggested in https://github.com/python-poetry/poetry/issues/273\nEPHIOS_VERSION = \"v\" + importlib.metadata.version(\"ephios\")\n\n\ndef ephios_base_context(request):\n    footer = {}\n    for _, result in footer_link.send(None, request=request):\n        for label, url in result.items():\n            footer[label] = url\n\n    datatables_translation_url = None\n    if get_language() == \"de-de\":\n        datatables_translation_url = static(\"datatables/german.json\")\n\n    return {\n        \"ParticipationStates\": AbstractParticipation.States,\n        \"footer\": footer,\n        \"datatables_translation_url\": datatables_translation_url,\n        \"ephios_version\": EPHIOS_VERSION,\n        \"SITE_URL\": settings.SITE_URL,\n        \"PWA_APP_ICONS\": settings.PWA_APP_ICONS,\n    }\n", "path": "ephios/core/context.py"}], "after_files": [{"content": "import importlib\n\nfrom django.conf import settings\nfrom django.utils.translation import get_language\n\nfrom ephios.core.models import AbstractParticipation\nfrom ephios.core.signals import footer_link\n\n# suggested in https://github.com/python-poetry/poetry/issues/273\nEPHIOS_VERSION = \"v\" + importlib.metadata.version(\"ephios\")\n\n\ndef ephios_base_context(request):\n    footer = {}\n    for _, result in footer_link.send(None, request=request):\n        for label, url in result.items():\n            footer[label] = url\n\n    return {\n        \"ParticipationStates\": AbstractParticipation.States,\n        \"footer\": footer,\n        \"LANGUAGE_CODE\": get_language(),\n        \"ephios_version\": EPHIOS_VERSION,\n        \"SITE_URL\": settings.SITE_URL,\n        \"PWA_APP_ICONS\": settings.PWA_APP_ICONS,\n    }\n", "path": "ephios/core/context.py"}]}