cleanup in villages/

This commit is contained in:
Stephan Telling 2018-03-04 15:40:34 +01:00
parent 8026dba14f
commit 5bffb9c53a
2 changed files with 3 additions and 5 deletions

View file

@ -1,5 +1,3 @@
from django.apps import AppConfig from django.apps import AppConfig

View file

@ -9,9 +9,9 @@ class EnsureWritableCampMixin(SingleObjectMixin):
# do not permit view if camp is in readonly mode # do not permit view if camp is in readonly mode
if self.camp.read_only: if self.camp.read_only:
messages.error(request, "No thanks") messages.error(request, "No thanks")
return redirect(reverse('village_list', kwargs={'camp_slug': self.camp.slug})) return redirect(
reverse('village_list', kwargs={'camp_slug': self.camp.slug})
)
# alright, continue with the request # alright, continue with the request
return super().dispatch(request, *args, **kwargs) return super().dispatch(request, *args, **kwargs)