get[section], fixes #1834
This commit is contained in:
parent
95d87ef382
commit
e1760e7b50
4 changed files with 29 additions and 2 deletions
|
|
@ -97,6 +97,9 @@ def getText(request):
|
|||
text = qs[0]
|
||||
else:
|
||||
text = get_text_or_404_json(data['id'])
|
||||
if not text.accessible(request.user):
|
||||
text = None
|
||||
response['status']['code'] = 404
|
||||
if text:
|
||||
response['data'] = text.json(user=request.user)
|
||||
return render_to_json_response(response)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue