Commit 6c61ce78 authored by Levy--Falk Hugo's avatar Levy--Falk Hugo

Fix du forcer le déménagement

parent b940dfbf
......@@ -340,7 +340,11 @@ class AdherentForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
"""On supprime l'ancien user de la chambre si et seulement si la
case est cochée"""
if self.cleaned_data.get('force', False):
room = self.cleaned_data.get('room')
if room is None:
raise forms.ValidationError("Invalid Room")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment