mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 12:01:14 +00:00
Don't redirect on http request to readthrough
This commit is contained in:
parent
d78c278665
commit
52c6a90498
2 changed files with 3 additions and 1 deletions
|
@ -167,6 +167,8 @@ def edit_readthrough(request):
|
||||||
# use default now for date field
|
# use default now for date field
|
||||||
readthrough.create_update()
|
readthrough.create_update()
|
||||||
|
|
||||||
|
if is_api_request(request):
|
||||||
|
return HttpResponse()
|
||||||
return redirect(request.headers.get("Referer", "/"))
|
return redirect(request.headers.get("Referer", "/"))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ class DeleteAndRedraft(View):
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@require_POST
|
@require_POST
|
||||||
def update_progress(request, book_id):
|
def update_progress(request, book_id): # pylint: disable=unused-argument
|
||||||
"""Either it's just a progress update, or it's a comment with a progress update"""
|
"""Either it's just a progress update, or it's a comment with a progress update"""
|
||||||
if request.POST.get("post-status"):
|
if request.POST.get("post-status"):
|
||||||
return CreateStatus.as_view()(request, "comment")
|
return CreateStatus.as_view()(request, "comment")
|
||||||
|
|
Loading…
Reference in a new issue