From 3bd8cbe860a45de87bd924368023ba339f9345b3 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Sun, 27 Sep 2020 19:18:19 +0200 Subject: [PATCH] Handle projects for which there is (yet) no QC data --- bin/human_exports_qc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/human_exports_qc.py b/bin/human_exports_qc.py index 225fb49..fa4552b 100755 --- a/bin/human_exports_qc.py +++ b/bin/human_exports_qc.py @@ -53,7 +53,13 @@ def qc_item(item, prefixes = [], index = None): qc_item(child, [*prefixes, name], subindex) def qc_data (cursor, prefix): - qc = db.get_info('qc', cursor)[0] + qc = db.get_info('qc', cursor) + if qc is not None: + qc = qc[0] + else: + print("No QC data found"); + return + #print("QC", qc) index = 0 for item in qc["results"]: