get[section], fixes #1834

This commit is contained in:
j 2013-08-26 17:05:49 +00:00
commit e1760e7b50
4 changed files with 29 additions and 2 deletions

View file

@ -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)