From c7efe3eed34842de7165908eb73b396b459660da Mon Sep 17 00:00:00 2001 From: Brandon King Date: Wed, 17 Jun 2009 18:39:42 +0000 Subject: [PATCH] Apparently we might be receiving None, so this check should fix it. --- htsworkflow/frontend/samples/views.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index e64ce67..9d355e2 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -322,15 +322,16 @@ def _make_eland_results(flowcell_id, lane, interesting_flowcells): # Loop throw storage devices if a result has been archived storage_id_list = [] - for lts in cur_fc.longtermstorage_set.all(): - for sd in lts.storage_devices.all(): - # Use barcode_id if it exists - if sd.barcode_id is not None and sd.barcode_id != '': - storage_id_list.append(sd.barcode_id) - # Otherwise use UUID - else: - storage_id_list.append(sd.uuid) - + if cur_fc is not None: + for lts in cur_fc.longtermstorage_set.all(): + for sd in lts.storage_devices.all(): + # Use barcode_id if it exists + if sd.barcode_id is not None and sd.barcode_id != '': + storage_id_list.append(sd.barcode_id) + # Otherwise use UUID + else: + storage_id_list.append(sd.uuid) + # Formatting for template use if len(storage_id_list) == 0: storage_ids = None -- 2.30.2