mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-06 01:46:27 +00:00
Merge branch '221-Fixes-force-the-move' into 'dev'
Fixes Issue 221 See merge request federez/re2o!435
This commit is contained in:
commit
92751cb5cf
1 changed files with 3 additions and 2 deletions
|
@ -371,8 +371,9 @@ class AdherentForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
|
||||||
def clean_force(self):
|
def clean_force(self):
|
||||||
"""On supprime l'ancien user de la chambre si et seulement si la
|
"""On supprime l'ancien user de la chambre si et seulement si la
|
||||||
case est cochée"""
|
case est cochée"""
|
||||||
if self.cleaned_data.get('force', False):
|
room = self.cleaned_data.get('room')
|
||||||
remove_user_room(self.cleaned_data.get('room'))
|
if self.cleaned_data.get('force', False) and room:
|
||||||
|
remove_user_room(room)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue