Skip to content
Snippets Groups Projects
Commit 4104c91b authored by Carlos Vega's avatar Carlos Vega
Browse files

fixed clean_location method in appointment form

parent 519a1d4e
No related branches found
No related tags found
1 merge request!229Feature/provenance
Pipeline #23035 failed
...@@ -105,6 +105,7 @@ class AppointmentEditForm(AppointmentForm): ...@@ -105,6 +105,7 @@ class AppointmentEditForm(AppointmentForm):
location = self.cleaned_data['location'] location = self.cleaned_data['location']
if self.user.locations.filter(id=location.id).count() == 0: if self.user.locations.filter(id=location.id).count() == 0:
self.add_error('location', "You cannot create appointment for this location") self.add_error('location', "You cannot create appointment for this location")
return None
else: else:
return location return location
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment