mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
Fix side effect when importing multi_op
This commit is contained in:
parent
681d7f10b2
commit
deccc437d5
1 changed files with 3 additions and 1 deletions
|
@ -36,15 +36,17 @@ from topologie.models import Dormitory
|
|||
|
||||
from .preferences.models import MultiopOption
|
||||
|
||||
|
||||
class DormitoryForm(FormRevMixin, Form):
|
||||
"""Form used to select dormitories."""
|
||||
|
||||
dormitory = forms.ModelMultipleChoiceField(
|
||||
queryset=MultiopOption.get_cached_value("enabled_dorm").all(),
|
||||
label=_("Dormitory"),
|
||||
widget=forms.CheckboxSelectMultiple,
|
||||
required=False,
|
||||
queryset=Dormitory.objects.none(),
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(DormitoryForm, self).__init__(*args, **kwargs)
|
||||
self.fields["dormitory"].queryset = MultiopOption.get_cached_value("enabled_dorm").all()
|
||||
|
|
Loading…
Reference in a new issue