mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
Merge branch 'fix-multi-op-side-effect' into 'dev'
Fix side effect when importing multi_op See merge request re2o/re2o!581
This commit is contained in:
commit
01384ce296
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