diff --git a/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb b/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb
index 8e8f55ba4725fe2766f9c35f8146d9612d80e15a..6ad80ff6010432c439814a1a91905b44fb842682 100644
--- a/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb
+++ b/notebooks/DSSC/Characterize_DSSC_Darks_NBC.ipynb
@@ -498,7 +498,7 @@
     "                                             target_gain=targetgain,\n",
     "                                             encoded_gain=encodedgain)\n",
     "            \n",
-    "            if True:\n",
+    "            if db_output:\n",
     "                md = send_to_db(db_module, karabo_id, dconst, condition, file_loc, report,\n",
     "                                cal_db_interface, creation_time=creation_time, timeout=cal_db_timeout)\n",
     "                \n",