From: Diane Trout Date: Tue, 5 Apr 2011 05:37:41 +0000 (-0700) Subject: Revert a bad change. Apparently past me knew what I was doing, X-Git-Tag: 0.5.2~45 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=339e50df97972aba1830af6e28cebbee5c432d8e 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. --- 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')