We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Having only one submission type shows all submission types
## Current Behavior
If an event only uses one submission type, the submission form shows submission types for ALL events


## Expected Behavior
Only submission types for the current conference should populate the dropdown. 
Added bonus: if only one, the field should be read-only/text. 

## Steps to Reproduce

1. https://pretalx.com/orga/event/[YOUREVENT]/cfp/types/
2. Enter only one type
3. Navigate to https://pretalx.com/[YOUREVENT]/submit/
4. Click the dropdown for "Submission type"

<img width="801" alt="Screen Shot 2019-03-30 at 5 35 39 pm" src="https://user-images.githubusercontent.com/813732/55272568-53aeeb80-5312-11e9-8de9-e101aa53034f.png">


### Work around

Enter more than one submission type. 

## Your Environment

Pretalx hosted environment

Having only one submission type shows all submission types
## Current Behavior
If an event only uses one submission type, the submission form shows submission types for ALL events


## Expected Behavior
Only submission types for the current conference should populate the dropdown. 
Added bonus: if only one, the field should be read-only/text. 

## Steps to Reproduce

1. https://pretalx.com/orga/event/[YOUREVENT]/cfp/types/
2. Enter only one type
3. Navigate to https://pretalx.com/[YOUREVENT]/submit/
4. Click the dropdown for "Submission type"

<img width="801" alt="Screen Shot 2019-03-30 at 5 35 39 pm" src="https://user-images.githubusercontent.com/813732/55272568-53aeeb80-5312-11e9-8de9-e101aa53034f.png">


### Work around

Enter more than one submission type. 

## Your Environment

Pretalx hosted environment


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/pretalx/submission/forms/submission.py`
Content:
```
1 import os
2 
3 from django import forms
4 from django.conf import settings
5 from django.utils.timezone import now
6 from django.utils.translation import ugettext_lazy as _
7 
8 from pretalx.common.forms.fields import IMAGE_EXTENSIONS
9 from pretalx.common.forms.widgets import CheckboxMultiDropdown
10 from pretalx.common.mixins.forms import PublicContent, RequestRequire
11 from pretalx.submission.models import Submission, SubmissionStates
12 
13 
14 class InfoForm(RequestRequire, PublicContent, forms.ModelForm):
15     additional_speaker = forms.EmailField(
16         label=_('Additional Speaker'),
17         help_text=_('If you have a co-speaker, please add their email address here, and we will invite them to create an account. If you have more than one co-speaker, you can add more speakers after finishing the submission process.'),
18         required=False,
19     )
20 
21     def __init__(self, event, **kwargs):
22         self.event = event
23         self.readonly = kwargs.pop('readonly', False)
24         instance = kwargs.get('instance')
25         initial = kwargs.pop('initial', {})
26         initial['submission_type'] = getattr(
27             instance, 'submission_type', self.event.cfp.default_type
28         )
29         initial['content_locale'] = getattr(
30             instance, 'content_locale', self.event.locale
31         )
32 
33         super().__init__(initial=initial, **kwargs)
34 
35         if 'abstract' in self.fields:
36             self.fields['abstract'].widget.attrs['rows'] = 2
37         if 'track' in self.fields:
38             if not instance or instance.state == SubmissionStates.SUBMITTED:
39                 self.fields['track'].queryset = event.tracks.all()
40             elif not event.settings.use_tracks or instance and instance.state != SubmissionStates.SUBMITTED:
41                 self.fields.pop('track')
42         if instance and instance.pk:
43             self.fields.pop('additional_speaker')
44 
45         self._set_submission_types(instance=instance)
46         self._set_locales()
47 
48         if not event.settings.present_multiple_times:
49             self.fields.pop('slot_count', None)
50         elif 'slot_count' in self.fields and instance and instance.state in [SubmissionStates.ACCEPTED, SubmissionStates.CONFIRMED]:
51             self.fields['slot_count'].disabled = True
52             self.fields['slot_count'].help_text += ' ' + str(_('Please contact the organisers if you want to change how often you\'re presenting this submission.'))
53 
54         if self.readonly:
55             for f in self.fields.values():
56                 f.disabled = True
57 
58     def _set_submission_types(self, instance=None):
59         _now = now()
60         if (
61             not self.event.cfp.deadline or self.event.cfp.deadline >= _now
62         ):  # No global deadline or still open
63             types = self.event.submission_types.exclude(deadline__lt=_now)
64         else:
65             types = self.event.submission_types.filter(deadline__gte=_now)
66         pks = set(types.values_list('pk', flat=True))
67         if instance and instance.pk:
68             pks |= {instance.submission_type.pk}
69         if len(pks) == 1:
70             self.fields['submission_type'].initial = self.event.submission_types.get(pk=pks.pop())
71             self.fields['content_locale'].widget = forms.HiddenInput()
72             self.fields['content_locale'].disabled = True
73         else:
74             self.fields['submission_type'].queryset = self.event.submission_types.filter(
75                 pk__in=pks
76             )
77 
78     def _set_locales(self):
79         if len(self.event.locales) == 1:
80             self.fields['content_locale'].initial = self.event.locales[0]
81             self.fields['content_locale'].widget = forms.HiddenInput()
82             self.fields['content_locale'].disabled = True
83         else:
84             locale_names = dict(settings.LANGUAGES)
85             self.fields['content_locale'].choices = [
86                 (a, locale_names[a]) for a in self.event.locales
87             ]
88 
89     def clean_image(self):
90         image = self.cleaned_data.get('image')
91         if image:
92             extension = os.path.splitext(image.name)[1].lower()
93             if extension not in IMAGE_EXTENSIONS:
94                 raise forms.ValidationError(
95                     _(
96                         "This filetype is not allowed, it has to be one of the following: "
97                     )
98                     + ', '.join(IMAGE_EXTENSIONS)
99                 )
100         return image
101 
102     class Meta:
103         model = Submission
104         fields = [
105             'title',
106             'submission_type',
107             'track',
108             'content_locale',
109             'abstract',
110             'description',
111             'notes',
112             'slot_count',
113             'do_not_record',
114             'image',
115         ]
116         request_require = [
117             'abstract',
118             'description',
119             'notes',
120             'image',
121             'do_not_record',
122             'track',
123         ]
124         public_fields = ['title', 'abstract', 'description', 'image']
125 
126 
127 class SubmissionFilterForm(forms.Form):
128     state = forms.MultipleChoiceField(
129         choices=SubmissionStates.get_choices(),
130         required=False,
131         widget=CheckboxMultiDropdown,
132     )
133     submission_type = forms.MultipleChoiceField(
134         required=False, widget=CheckboxMultiDropdown
135     )
136     track = forms.MultipleChoiceField(
137         required=False, widget=CheckboxMultiDropdown
138     )
139 
140     def __init__(self, event, *args, **kwargs):
141         self.event = event
142         usable_states = kwargs.pop('usable_states', None)
143         super().__init__(*args, **kwargs)
144         sub_count = (
145             lambda x: event.submissions(manager='all_objects').filter(state=x).count()
146         )  # noqa
147         type_count = (
148             lambda x: event.submissions(manager='all_objects')
149             .filter(submission_type=x)  # noqa
150             .count()
151         )
152         track_count = (
153             lambda x: event.submissions(manager='all_objects')
154             .filter(track=x) #noqa
155             .count()
156         )
157         self.fields['submission_type'].choices = [
158             (sub_type.pk, f'{str(sub_type)} ({type_count(sub_type.pk)})')
159             for sub_type in event.submission_types.all()
160         ]
161         self.fields['submission_type'].widget.attrs['title'] = _('Submission types')
162         if usable_states:
163             usable_states = [
164                 choice
165                 for choice in self.fields['state'].choices
166                 if choice[0] in usable_states
167             ]
168         else:
169             usable_states = self.fields['state'].choices
170         self.fields['state'].choices = [
171             (choice[0], f'{choice[1].capitalize()} ({sub_count(choice[0])})')
172             for choice in usable_states
173         ]
174         self.fields['state'].widget.attrs['title'] = _('Submission states')
175         self.fields['track'].choices = [
176             (track.pk, f'{track.name} ({track_count(track.pk)})')
177             for track in event.tracks.all()
178         ]
179         self.fields['track'].widget.attrs['title'] = _('Tracks')
180
```
--- 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/src/pretalx/submission/forms/submission.py b/src/pretalx/submission/forms/submission.py
--- a/src/pretalx/submission/forms/submission.py
+++ b/src/pretalx/submission/forms/submission.py
@@ -66,14 +66,12 @@
         pks = set(types.values_list('pk', flat=True))
         if instance and instance.pk:
             pks |= {instance.submission_type.pk}
+        self.fields['submission_type'].queryset = self.event.submission_types.filter(
+            pk__in=pks
+        )
         if len(pks) == 1:
             self.fields['submission_type'].initial = self.event.submission_types.get(pk=pks.pop())
-            self.fields['content_locale'].widget = forms.HiddenInput()
-            self.fields['content_locale'].disabled = True
-        else:
-            self.fields['submission_type'].queryset = self.event.submission_types.filter(
-                pk__in=pks
-            )
+            self.fields['submission_type'].widget = forms.HiddenInput()
 
     def _set_locales(self):
         if len(self.event.locales) == 1:

{"golden_diff": "diff --git a/src/pretalx/submission/forms/submission.py b/src/pretalx/submission/forms/submission.py\n--- a/src/pretalx/submission/forms/submission.py\n+++ b/src/pretalx/submission/forms/submission.py\n@@ -66,14 +66,12 @@\n         pks = set(types.values_list('pk', flat=True))\n         if instance and instance.pk:\n             pks |= {instance.submission_type.pk}\n+        self.fields['submission_type'].queryset = self.event.submission_types.filter(\n+            pk__in=pks\n+        )\n         if len(pks) == 1:\n             self.fields['submission_type'].initial = self.event.submission_types.get(pk=pks.pop())\n-            self.fields['content_locale'].widget = forms.HiddenInput()\n-            self.fields['content_locale'].disabled = True\n-        else:\n-            self.fields['submission_type'].queryset = self.event.submission_types.filter(\n-                pk__in=pks\n-            )\n+            self.fields['submission_type'].widget = forms.HiddenInput()\n \n     def _set_locales(self):\n         if len(self.event.locales) == 1:\n", "issue": "Having only one submission type shows all submission types\n## Current Behavior\r\nIf an event only uses one submission type, the submission form shows submission types for ALL events\r\n\r\n\r\n## Expected Behavior\r\nOnly submission types for the current conference should populate the dropdown. \r\nAdded bonus: if only one, the field should be read-only/text. \r\n\r\n## Steps to Reproduce\r\n\r\n1. https://pretalx.com/orga/event/[YOUREVENT]/cfp/types/\r\n2. Enter only one type\r\n3. Navigate to https://pretalx.com/[YOUREVENT]/submit/\r\n4. Click the dropdown for \"Submission type\"\r\n\r\n<img width=\"801\" alt=\"Screen Shot 2019-03-30 at 5 35 39 pm\" src=\"https://user-images.githubusercontent.com/813732/55272568-53aeeb80-5312-11e9-8de9-e101aa53034f.png\">\r\n\r\n\r\n### Work around\r\n\r\nEnter more than one submission type. \r\n\r\n## Your Environment\r\n\r\nPretalx hosted environment\r\n\nHaving only one submission type shows all submission types\n## Current Behavior\r\nIf an event only uses one submission type, the submission form shows submission types for ALL events\r\n\r\n\r\n## Expected Behavior\r\nOnly submission types for the current conference should populate the dropdown. \r\nAdded bonus: if only one, the field should be read-only/text. \r\n\r\n## Steps to Reproduce\r\n\r\n1. https://pretalx.com/orga/event/[YOUREVENT]/cfp/types/\r\n2. Enter only one type\r\n3. Navigate to https://pretalx.com/[YOUREVENT]/submit/\r\n4. Click the dropdown for \"Submission type\"\r\n\r\n<img width=\"801\" alt=\"Screen Shot 2019-03-30 at 5 35 39 pm\" src=\"https://user-images.githubusercontent.com/813732/55272568-53aeeb80-5312-11e9-8de9-e101aa53034f.png\">\r\n\r\n\r\n### Work around\r\n\r\nEnter more than one submission type. \r\n\r\n## Your Environment\r\n\r\nPretalx hosted environment\r\n\n", "before_files": [{"content": "import os\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.utils.timezone import now\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pretalx.common.forms.fields import IMAGE_EXTENSIONS\nfrom pretalx.common.forms.widgets import CheckboxMultiDropdown\nfrom pretalx.common.mixins.forms import PublicContent, RequestRequire\nfrom pretalx.submission.models import Submission, SubmissionStates\n\n\nclass InfoForm(RequestRequire, PublicContent, forms.ModelForm):\n    additional_speaker = forms.EmailField(\n        label=_('Additional Speaker'),\n        help_text=_('If you have a co-speaker, please add their email address here, and we will invite them to create an account. If you have more than one co-speaker, you can add more speakers after finishing the submission process.'),\n        required=False,\n    )\n\n    def __init__(self, event, **kwargs):\n        self.event = event\n        self.readonly = kwargs.pop('readonly', False)\n        instance = kwargs.get('instance')\n        initial = kwargs.pop('initial', {})\n        initial['submission_type'] = getattr(\n            instance, 'submission_type', self.event.cfp.default_type\n        )\n        initial['content_locale'] = getattr(\n            instance, 'content_locale', self.event.locale\n        )\n\n        super().__init__(initial=initial, **kwargs)\n\n        if 'abstract' in self.fields:\n            self.fields['abstract'].widget.attrs['rows'] = 2\n        if 'track' in self.fields:\n            if not instance or instance.state == SubmissionStates.SUBMITTED:\n                self.fields['track'].queryset = event.tracks.all()\n            elif not event.settings.use_tracks or instance and instance.state != SubmissionStates.SUBMITTED:\n                self.fields.pop('track')\n        if instance and instance.pk:\n            self.fields.pop('additional_speaker')\n\n        self._set_submission_types(instance=instance)\n        self._set_locales()\n\n        if not event.settings.present_multiple_times:\n            self.fields.pop('slot_count', None)\n        elif 'slot_count' in self.fields and instance and instance.state in [SubmissionStates.ACCEPTED, SubmissionStates.CONFIRMED]:\n            self.fields['slot_count'].disabled = True\n            self.fields['slot_count'].help_text += ' ' + str(_('Please contact the organisers if you want to change how often you\\'re presenting this submission.'))\n\n        if self.readonly:\n            for f in self.fields.values():\n                f.disabled = True\n\n    def _set_submission_types(self, instance=None):\n        _now = now()\n        if (\n            not self.event.cfp.deadline or self.event.cfp.deadline >= _now\n        ):  # No global deadline or still open\n            types = self.event.submission_types.exclude(deadline__lt=_now)\n        else:\n            types = self.event.submission_types.filter(deadline__gte=_now)\n        pks = set(types.values_list('pk', flat=True))\n        if instance and instance.pk:\n            pks |= {instance.submission_type.pk}\n        if len(pks) == 1:\n            self.fields['submission_type'].initial = self.event.submission_types.get(pk=pks.pop())\n            self.fields['content_locale'].widget = forms.HiddenInput()\n            self.fields['content_locale'].disabled = True\n        else:\n            self.fields['submission_type'].queryset = self.event.submission_types.filter(\n                pk__in=pks\n            )\n\n    def _set_locales(self):\n        if len(self.event.locales) == 1:\n            self.fields['content_locale'].initial = self.event.locales[0]\n            self.fields['content_locale'].widget = forms.HiddenInput()\n            self.fields['content_locale'].disabled = True\n        else:\n            locale_names = dict(settings.LANGUAGES)\n            self.fields['content_locale'].choices = [\n                (a, locale_names[a]) for a in self.event.locales\n            ]\n\n    def clean_image(self):\n        image = self.cleaned_data.get('image')\n        if image:\n            extension = os.path.splitext(image.name)[1].lower()\n            if extension not in IMAGE_EXTENSIONS:\n                raise forms.ValidationError(\n                    _(\n                        \"This filetype is not allowed, it has to be one of the following: \"\n                    )\n                    + ', '.join(IMAGE_EXTENSIONS)\n                )\n        return image\n\n    class Meta:\n        model = Submission\n        fields = [\n            'title',\n            'submission_type',\n            'track',\n            'content_locale',\n            'abstract',\n            'description',\n            'notes',\n            'slot_count',\n            'do_not_record',\n            'image',\n        ]\n        request_require = [\n            'abstract',\n            'description',\n            'notes',\n            'image',\n            'do_not_record',\n            'track',\n        ]\n        public_fields = ['title', 'abstract', 'description', 'image']\n\n\nclass SubmissionFilterForm(forms.Form):\n    state = forms.MultipleChoiceField(\n        choices=SubmissionStates.get_choices(),\n        required=False,\n        widget=CheckboxMultiDropdown,\n    )\n    submission_type = forms.MultipleChoiceField(\n        required=False, widget=CheckboxMultiDropdown\n    )\n    track = forms.MultipleChoiceField(\n        required=False, widget=CheckboxMultiDropdown\n    )\n\n    def __init__(self, event, *args, **kwargs):\n        self.event = event\n        usable_states = kwargs.pop('usable_states', None)\n        super().__init__(*args, **kwargs)\n        sub_count = (\n            lambda x: event.submissions(manager='all_objects').filter(state=x).count()\n        )  # noqa\n        type_count = (\n            lambda x: event.submissions(manager='all_objects')\n            .filter(submission_type=x)  # noqa\n            .count()\n        )\n        track_count = (\n            lambda x: event.submissions(manager='all_objects')\n            .filter(track=x) #noqa\n            .count()\n        )\n        self.fields['submission_type'].choices = [\n            (sub_type.pk, f'{str(sub_type)} ({type_count(sub_type.pk)})')\n            for sub_type in event.submission_types.all()\n        ]\n        self.fields['submission_type'].widget.attrs['title'] = _('Submission types')\n        if usable_states:\n            usable_states = [\n                choice\n                for choice in self.fields['state'].choices\n                if choice[0] in usable_states\n            ]\n        else:\n            usable_states = self.fields['state'].choices\n        self.fields['state'].choices = [\n            (choice[0], f'{choice[1].capitalize()} ({sub_count(choice[0])})')\n            for choice in usable_states\n        ]\n        self.fields['state'].widget.attrs['title'] = _('Submission states')\n        self.fields['track'].choices = [\n            (track.pk, f'{track.name} ({track_count(track.pk)})')\n            for track in event.tracks.all()\n        ]\n        self.fields['track'].widget.attrs['title'] = _('Tracks')\n", "path": "src/pretalx/submission/forms/submission.py"}], "after_files": [{"content": "import os\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.utils.timezone import now\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pretalx.common.forms.fields import IMAGE_EXTENSIONS\nfrom pretalx.common.forms.widgets import CheckboxMultiDropdown\nfrom pretalx.common.mixins.forms import PublicContent, RequestRequire\nfrom pretalx.submission.models import Submission, SubmissionStates\n\n\nclass InfoForm(RequestRequire, PublicContent, forms.ModelForm):\n    additional_speaker = forms.EmailField(\n        label=_('Additional Speaker'),\n        help_text=_('If you have a co-speaker, please add their email address here, and we will invite them to create an account. If you have more than one co-speaker, you can add more speakers after finishing the submission process.'),\n        required=False,\n    )\n\n    def __init__(self, event, **kwargs):\n        self.event = event\n        self.readonly = kwargs.pop('readonly', False)\n        instance = kwargs.get('instance')\n        initial = kwargs.pop('initial', {})\n        initial['submission_type'] = getattr(\n            instance, 'submission_type', self.event.cfp.default_type\n        )\n        initial['content_locale'] = getattr(\n            instance, 'content_locale', self.event.locale\n        )\n\n        super().__init__(initial=initial, **kwargs)\n\n        if 'abstract' in self.fields:\n            self.fields['abstract'].widget.attrs['rows'] = 2\n        if 'track' in self.fields:\n            if not instance or instance.state == SubmissionStates.SUBMITTED:\n                self.fields['track'].queryset = event.tracks.all()\n            elif not event.settings.use_tracks or instance and instance.state != SubmissionStates.SUBMITTED:\n                self.fields.pop('track')\n        if instance and instance.pk:\n            self.fields.pop('additional_speaker')\n\n        self._set_submission_types(instance=instance)\n        self._set_locales()\n\n        if not event.settings.present_multiple_times:\n            self.fields.pop('slot_count', None)\n        elif 'slot_count' in self.fields and instance and instance.state in [SubmissionStates.ACCEPTED, SubmissionStates.CONFIRMED]:\n            self.fields['slot_count'].disabled = True\n            self.fields['slot_count'].help_text += ' ' + str(_('Please contact the organisers if you want to change how often you\\'re presenting this submission.'))\n\n        if self.readonly:\n            for f in self.fields.values():\n                f.disabled = True\n\n    def _set_submission_types(self, instance=None):\n        _now = now()\n        if (\n            not self.event.cfp.deadline or self.event.cfp.deadline >= _now\n        ):  # No global deadline or still open\n            types = self.event.submission_types.exclude(deadline__lt=_now)\n        else:\n            types = self.event.submission_types.filter(deadline__gte=_now)\n        pks = set(types.values_list('pk', flat=True))\n        if instance and instance.pk:\n            pks |= {instance.submission_type.pk}\n        self.fields['submission_type'].queryset = self.event.submission_types.filter(\n            pk__in=pks\n        )\n        if len(pks) == 1:\n            self.fields['submission_type'].initial = self.event.submission_types.get(pk=pks.pop())\n            self.fields['submission_type'].widget = forms.HiddenInput()\n\n    def _set_locales(self):\n        if len(self.event.locales) == 1:\n            self.fields['content_locale'].initial = self.event.locales[0]\n            self.fields['content_locale'].widget = forms.HiddenInput()\n            self.fields['content_locale'].disabled = True\n        else:\n            locale_names = dict(settings.LANGUAGES)\n            self.fields['content_locale'].choices = [\n                (a, locale_names[a]) for a in self.event.locales\n            ]\n\n    def clean_image(self):\n        image = self.cleaned_data.get('image')\n        if image:\n            extension = os.path.splitext(image.name)[1].lower()\n            if extension not in IMAGE_EXTENSIONS:\n                raise forms.ValidationError(\n                    _(\n                        \"This filetype is not allowed, it has to be one of the following: \"\n                    )\n                    + ', '.join(IMAGE_EXTENSIONS)\n                )\n        return image\n\n    class Meta:\n        model = Submission\n        fields = [\n            'title',\n            'submission_type',\n            'track',\n            'content_locale',\n            'abstract',\n            'description',\n            'notes',\n            'slot_count',\n            'do_not_record',\n            'image',\n        ]\n        request_require = [\n            'abstract',\n            'description',\n            'notes',\n            'image',\n            'do_not_record',\n            'track',\n        ]\n        public_fields = ['title', 'abstract', 'description', 'image']\n\n\nclass SubmissionFilterForm(forms.Form):\n    state = forms.MultipleChoiceField(\n        choices=SubmissionStates.get_choices(),\n        required=False,\n        widget=CheckboxMultiDropdown,\n    )\n    submission_type = forms.MultipleChoiceField(\n        required=False, widget=CheckboxMultiDropdown\n    )\n    track = forms.MultipleChoiceField(\n        required=False, widget=CheckboxMultiDropdown\n    )\n\n    def __init__(self, event, *args, **kwargs):\n        self.event = event\n        usable_states = kwargs.pop('usable_states', None)\n        super().__init__(*args, **kwargs)\n        sub_count = (\n            lambda x: event.submissions(manager='all_objects').filter(state=x).count()\n        )  # noqa\n        type_count = (\n            lambda x: event.submissions(manager='all_objects')\n            .filter(submission_type=x)  # noqa\n            .count()\n        )\n        track_count = (\n            lambda x: event.submissions(manager='all_objects')\n            .filter(track=x) #noqa\n            .count()\n        )\n        self.fields['submission_type'].choices = [\n            (sub_type.pk, f'{str(sub_type)} ({type_count(sub_type.pk)})')\n            for sub_type in event.submission_types.all()\n        ]\n        self.fields['submission_type'].widget.attrs['title'] = _('Submission types')\n        if usable_states:\n            usable_states = [\n                choice\n                for choice in self.fields['state'].choices\n                if choice[0] in usable_states\n            ]\n        else:\n            usable_states = self.fields['state'].choices\n        self.fields['state'].choices = [\n            (choice[0], f'{choice[1].capitalize()} ({sub_count(choice[0])})')\n            for choice in usable_states\n        ]\n        self.fields['state'].widget.attrs['title'] = _('Submission states')\n        self.fields['track'].choices = [\n            (track.pk, f'{track.name} ({track_count(track.pk)})')\n            for track in event.tracks.all()\n        ]\n        self.fields['track'].widget.attrs['title'] = _('Tracks')\n", "path": "src/pretalx/submission/forms/submission.py"}]}