Skip to content

Commit

Permalink
No more error 500.
Browse files Browse the repository at this point in the history
Fix filter
  • Loading branch information
artragis committed Jan 2, 2017
1 parent ef3d824 commit d657542
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion zds/tutorialv2/views/views_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,7 @@ class AddAuthorToContent(LoggedWithReadWriteHability, SingleContentFormViewMixin
authorized_for_staff = True
already_finished = False

def get(self):
def get(self, request, *args, **kwargs):
content = self.get_object()
url = "content:find-{}".format("tutorial" if content.is_tutorial() else content.type.lower())
return redirect(url, self.request.user)
Expand Down
2 changes: 0 additions & 2 deletions zds/tutorialv2/views/views_published.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@ def get_queryset(self):

if self.current_content_type:
queryset = queryset.filter(content_type=self.current_content_type)
else:
queryset = queryset.filter(content__sha_picked=F('sha_public'))

# prefetch:
queryset = queryset\
Expand Down
2 changes: 1 addition & 1 deletion zds/tutorialv2/views/views_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def form_valid(self, form):


class ValidPublication(PermissionRequiredMixin, NoValidationBeforeFormViewMixin):
"""Publish the content"""
"""Approve the content"""

form_class = OpinionValidationForm

Expand Down

0 comments on commit d657542

Please sign in to comment.