prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Maptopicprio: Polygon may not be set
  When I try to create a maptopic in the dashboard, it is not guaranteed that a polygon is already set. The map for setting a point therefore fails to display.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `meinberlin/apps/maptopicprio/dashboard.py`
  Content:
  ```
  1 from django.urls import reverse
  2 from django.utils.translation import ugettext_lazy as _
  3 
  4 from meinberlin.apps.dashboard2 import DashboardComponent
  5 from meinberlin.apps.dashboard2 import components
  6 
  7 from . import models
  8 from . import views
  9 
  10 
  11 class MapTopicEditComponent(DashboardComponent):
  12     identifier = 'map_topic_edit'
  13     weight = 20
  14     label = _('Places')
  15 
  16     def is_effective(self, module):
  17         module_app = module.phases[0].content().app
  18         return module_app == 'meinberlin_maptopicprio'
  19 
  20     def get_progress(self, module):
  21         if models.MapTopic.objects.filter(module=module).exists():
  22             return 1, 1
  23         return 0, 1
  24 
  25     def get_base_url(self, module):
  26         return reverse('a4dashboard:maptopic-list', kwargs={
  27             'module_slug': module.slug
  28         })
  29 
  30     def get_urls(self):
  31         return [
  32             (r'^maptopics/module/(?P<module_slug>[-\w_]+)/$',
  33              views.MapTopicListDashboardView.as_view(component=self),
  34              'maptopic-list'),
  35             (r'^maptopics/create/module/(?P<module_slug>[-\w_]+)/$',
  36              views.MapTopicCreateView.as_view(component=self),
  37              'maptopic-create'),
  38             (r'^maptopics/(?P<slug>[-\w_]+)/update/$',
  39              views.MapTopicUpdateView.as_view(component=self),
  40              'maptopic-update'),
  41             (r'^maptopics/(?P<slug>[-\w_]+)/delete/$',
  42              views.MapTopicDeleteView.as_view(component=self),
  43              'maptopic-delete')
  44         ]
  45 
  46 
  47 components.register_module(MapTopicEditComponent())
  48
  ```
  --- 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/meinberlin/apps/maptopicprio/dashboard.py b/meinberlin/apps/maptopicprio/dashboard.py
  --- a/meinberlin/apps/maptopicprio/dashboard.py
  +++ b/meinberlin/apps/maptopicprio/dashboard.py
  @@ -15,7 +15,12 @@
   
       def is_effective(self, module):
           module_app = module.phases[0].content().app
  -        return module_app == 'meinberlin_maptopicprio'
  +        if module_app != 'meinberlin_maptopicprio':
  +            return False
  +        elif module.settings_instance.polygon == '':
  +            return False
  +        else:
  +            return True
   
       def get_progress(self, module):
           if models.MapTopic.objects.filter(module=module).exists():
  
verification_info: {"golden_diff": "diff --git a/meinberlin/apps/maptopicprio/dashboard.py b/meinberlin/apps/maptopicprio/dashboard.py\n--- a/meinberlin/apps/maptopicprio/dashboard.py\n+++ b/meinberlin/apps/maptopicprio/dashboard.py\n@@ -15,7 +15,12 @@\n \n     def is_effective(self, module):\n         module_app = module.phases[0].content().app\n-        return module_app == 'meinberlin_maptopicprio'\n+        if module_app != 'meinberlin_maptopicprio':\n+            return False\n+        elif module.settings_instance.polygon == '':\n+            return False\n+        else:\n+            return True\n \n     def get_progress(self, module):\n         if models.MapTopic.objects.filter(module=module).exists():\n", "issue": "Maptopicprio: Polygon may not be set\nWhen I try to create a maptopic in the dashboard, it is not guaranteed that a polygon is already set. The map for setting a point therefore fails to display.\n", "before_files": [{"content": "from django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom meinberlin.apps.dashboard2 import DashboardComponent\nfrom meinberlin.apps.dashboard2 import components\n\nfrom . import models\nfrom . import views\n\n\nclass MapTopicEditComponent(DashboardComponent):\n    identifier = 'map_topic_edit'\n    weight = 20\n    label = _('Places')\n\n    def is_effective(self, module):\n        module_app = module.phases[0].content().app\n        return module_app == 'meinberlin_maptopicprio'\n\n    def get_progress(self, module):\n        if models.MapTopic.objects.filter(module=module).exists():\n            return 1, 1\n        return 0, 1\n\n    def get_base_url(self, module):\n        return reverse('a4dashboard:maptopic-list', kwargs={\n            'module_slug': module.slug\n        })\n\n    def get_urls(self):\n        return [\n            (r'^maptopics/module/(?P<module_slug>[-\\w_]+)/$',\n             views.MapTopicListDashboardView.as_view(component=self),\n             'maptopic-list'),\n            (r'^maptopics/create/module/(?P<module_slug>[-\\w_]+)/$',\n             views.MapTopicCreateView.as_view(component=self),\n             'maptopic-create'),\n            (r'^maptopics/(?P<slug>[-\\w_]+)/update/$',\n             views.MapTopicUpdateView.as_view(component=self),\n             'maptopic-update'),\n            (r'^maptopics/(?P<slug>[-\\w_]+)/delete/$',\n             views.MapTopicDeleteView.as_view(component=self),\n             'maptopic-delete')\n        ]\n\n\ncomponents.register_module(MapTopicEditComponent())\n", "path": "meinberlin/apps/maptopicprio/dashboard.py"}], "after_files": [{"content": "from django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom meinberlin.apps.dashboard2 import DashboardComponent\nfrom meinberlin.apps.dashboard2 import components\n\nfrom . import models\nfrom . import views\n\n\nclass MapTopicEditComponent(DashboardComponent):\n    identifier = 'map_topic_edit'\n    weight = 20\n    label = _('Places')\n\n    def is_effective(self, module):\n        module_app = module.phases[0].content().app\n        if module_app != 'meinberlin_maptopicprio':\n            return False\n        elif module.settings_instance.polygon == '':\n            return False\n        else:\n            return True\n\n    def get_progress(self, module):\n        if models.MapTopic.objects.filter(module=module).exists():\n            return 1, 1\n        return 0, 1\n\n    def get_base_url(self, module):\n        return reverse('a4dashboard:maptopic-list', kwargs={\n            'module_slug': module.slug\n        })\n\n    def get_urls(self):\n        return [\n            (r'^maptopics/module/(?P<module_slug>[-\\w_]+)/$',\n             views.MapTopicListDashboardView.as_view(component=self),\n             'maptopic-list'),\n            (r'^maptopics/create/module/(?P<module_slug>[-\\w_]+)/$',\n             views.MapTopicCreateView.as_view(component=self),\n             'maptopic-create'),\n            (r'^maptopics/(?P<slug>[-\\w_]+)/update/$',\n             views.MapTopicUpdateView.as_view(component=self),\n             'maptopic-update'),\n            (r'^maptopics/(?P<slug>[-\\w_]+)/delete/$',\n             views.MapTopicDeleteView.as_view(component=self),\n             'maptopic-delete')\n        ]\n\n\ncomponents.register_module(MapTopicEditComponent())\n", "path": "meinberlin/apps/maptopicprio/dashboard.py"}]}