Fixes deletion of reviews

This commit is contained in:
Christopher Neugebauer 2016-06-19 18:38:14 +10:00
parent 57acd04852
commit 14dea7eafa

View file

@ -292,7 +292,7 @@ def review_detail(request, pk):
@require_POST
def review_delete(request, pk):
review = get_object_or_404(Review, pk=pk)
section_slug = review.section.slug
section_slug = review.section
if not request.user.has_perm("reviews.can_manage_%s" % section_slug):
return access_not_permitted(request)