X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=blobdiff_plain;f=htsworkflow%2Ffrontend%2Fsamples%2Fviews.py;h=dd474a6506b844da3eaaa7d89807769c2975d3e9;hp=9456712da11f3c1998b0591a0bca87e8bec90bf3;hb=3d72e1d85b0153a3ed9bc454826fb2fe7b817efa;hpb=7d34fa0d67a0aa883d8c1f1af20a131f856ad533 diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index 9456712..dd474a6 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -19,9 +19,11 @@ from htsworkflow.pipelines.runfolder import load_pipeline_run_xml from htsworkflow.pipelines import runfolder from htsworkflow.pipelines.eland import ResultLane from htsworkflow.frontend import settings +from htsworkflow.util.conversion import unicode_or_none from htsworkflow.util import makebed from htsworkflow.util import opener + from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render_to_response @@ -472,8 +474,8 @@ def library_dict(library_id): #'antibody_name': lib.antibody_name(), # we have no antibodies. 'antibody_id': lib.antibody_id, 'avg_lib_size': lib.avg_lib_size, - 'cell_line': lib.cell_line.cellline_name, 'cell_line_id': lib.cell_line_id, + 'cell_line': unicode_or_none(lib.cell_line), 'experiment_type': lib.experiment_type.name, 'experiment_type_id': lib.experiment_type_id, 'id': lib.id, @@ -489,8 +491,8 @@ def library_dict(library_id): 'notes': lib.notes, 'replicate': lib.replicate, 'stopping_point': lib.stopping_point, - 'successful_pM': unicode(lib.successful_pM), - 'undiluted_concentration': unicode(lib.undiluted_concentration) + 'successful_pM': unicode_or_none(lib.successful_pM), + 'undiluted_concentration': unicode_or_none(lib.undiluted_concentration) } if lib.library_type_id is None: info['library_type'] = None