##// END OF EJS Templates
If trying to get thread diff from a GET request, send a message instead of failing with exception
neko259 -
r1425:acc799d1 default
parent child Browse files
Show More
@@ -50,8 +50,12 b' def api_get_threaddiff(request):'
50 50 """
51 51
52 52 thread_id = request.POST.get(PARAMETER_THREAD)
53 uids_str = request.POST.get(PARAMETER_UIDS).strip()
54 uids = uids_str.split(' ')
53 uids_str = request.POST.get(PARAMETER_UIDS)
54
55 if not thread_id or not uids_str:
56 return HttpResponse(content='Invalid request.')
57
58 uids = uids_str.strip().split(' ')
55 59
56 60 opening_post = get_object_or_404(Post, id=thread_id)
57 61 thread = opening_post.get_thread()
General Comments 0
You need to be logged in to leave comments. Login now