From dee6e4dc4586e1c007953017c9555b5885b45b60 Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Mon, 4 Apr 2022 11:25:10 +0200
Subject: [PATCH] fill table correctly if no constants retrieved

---
 notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb
index 5ba5cf50a..cd74bac4b 100644
--- a/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb
+++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify_Summary_NBC.ipynb
@@ -101,7 +101,9 @@
     "            timestamp = const_data[const]\n",
     "            table_data.setdefault(timestamp, []).append(f\"{seq}:{mod}\")\n",
     "    table = []\n",
-    "    if len(table_data) == 1:\n",
+    "    if len(table_data) == 0:\n",
+    "        table.append([\"No constants retrieved\"])\n",
+    "    elif len(table_data) == 1:\n",
     "        table.append([[*table_data][0], \"All modules\"])\n",
     "    else:\n",
     "        for timestamp, seqmod in table_data.items():\n",
-- 
GitLab