from django.core.exceptions import ObjectDoesNotExist
from django.core.mail import send_mail, mail_admins
from django.http import HttpResponse, Http404
+from django.conf import settings
from htsworkflow.frontend.auth import require_api_key
-from htsworkflow.frontend import settings
-from htsworkflow.frontend.experiments.models import FlowCell, DataRun, Lane
+from htsworkflow.frontend.experiments.models import \
+ FlowCell, \
+ DataRun, \
+ Lane, \
+ LANE_STATUS_MAP
from htsworkflow.frontend.samples.models import Library, HTSUser
def flowcell_information(flowcell_id):
Return a dictionary describing a flowcell
"""
try:
- fc = FlowCell.objects.get(flowcell_id=flowcell_id)
+ fc = FlowCell.objects.get(flowcell_id__startswith=flowcell_id)
except FlowCell.DoesNotExist, e:
return None
'library_id': lane.library.id,
'library_species': lane.library.library_species.scientific_name,
'pM': unicode(lane.pM),
- 'read_length': lane.flowcell.read_length
+ 'read_length': lane.flowcell.read_length,
+ 'status_code': lane.status,
+ 'status': LANE_STATUS_MAP[lane.status]
}
if fc.control_lane is None: