Fixes deletion of reviews
This commit is contained in:
parent
57acd04852
commit
14dea7eafa
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ def review_detail(request, pk):
|
||||||
@require_POST
|
@require_POST
|
||||||
def review_delete(request, pk):
|
def review_delete(request, pk):
|
||||||
review = get_object_or_404(Review, pk=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):
|
if not request.user.has_perm("reviews.can_manage_%s" % section_slug):
|
||||||
return access_not_permitted(request)
|
return access_not_permitted(request)
|
||||||
|
|
Loading…
Reference in a new issue