From 339e50df97972aba1830af6e28cebbee5c432d8e Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 4 Apr 2011 22:37:41 -0700 Subject: [PATCH] Revert a bad change. Apparently past me knew what I was doing, and I needed to manually construct the dictionary for feeding a json object, instead of just handing the json.dumps function a random django object. unlike the RDFa template which can just operate on the django ORM object. --- htsworkflow/frontend/samples/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index c57508f..c96b718 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -555,7 +555,9 @@ def library_json(request, library_id): require_api_key(request) # what validation should we do on library_id? - lib = get_object_or_404(Library, library_id=library_id) + lib = library_dict(library_id) + if lib is None: + raise Http404 lib_json = json.dumps(lib) return HttpResponse(lib_json, mimetype='application/json') -- 2.30.2