Attempt to be robust to not having an alignment in our RunXml file
[htsworkflow.git] / htsworkflow / frontend / samples / views.py
index 5ab54a9e4fafd49b9fdfc1df1131bf1120a42766..0479217fea4ebb21a5ab8b0e14871a91437689ba 100644 (file)
@@ -301,6 +301,10 @@ def _summary_stats(flowcell_id, lane_id, library_id):
             continue
 
         run = load_pipeline_run_xml(xmlpath)
+        # skip if we don't have available metadata.
+        if run.gerald is None or run.gerald.summary is None:
+            continue
+        
         gerald_summary = run.gerald.summary.lane_results
         key = SampleKey(lane=lane_id, sample='s')
         eland_results = list(run.gerald.eland_results.find_keys(key))