diff --git a/notebooks/generic/overallmodules_Darks_Summary_NBC.ipynb b/notebooks/generic/overallmodules_Darks_Summary_NBC.ipynb
index dcee1973f81f87431119835ae553b95ef6451814..a39aa078ab16549930390516f8e0180a1d1dab6c 100644
--- a/notebooks/generic/overallmodules_Darks_Summary_NBC.ipynb
+++ b/notebooks/generic/overallmodules_Darks_Summary_NBC.ipynb
@@ -212,7 +212,7 @@
     "# Loop over modules\n",
     "for i in range(nmods):\n",
     "    qm = module_index_to_qm(i)\n",
-    "    if qm not in metadata[\"modules-mapping\"].keys() and metadata[\"modules-mapping\"][qm]:\n",
+    "    if not metadata[\"modules-mapping\"].get(qm):\n",
     "        continue\n",
     "    det_name = metadata[\"modules-mapping\"][qm]\n",
     "    # loop over constants\n",