Skip to content

Commit

Permalink
fix crash when there is no threshold current in the responses
Browse files Browse the repository at this point in the history
Change-Id: I922e63fa3b5508339a331a4fff00b1b72cf7c068
  • Loading branch information
Jaquier Aurélien Tristan committed Oct 23, 2023
1 parent e79d704 commit 4b91b56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bluepyemodel/export_emodel/export_emodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def _write_node_file(emodel, model_template_path, node_file_path, morphology_pat
if emodel.emodel_metadata.brain_region is not None:
population["region"] = emodel.emodel_metadata.brain_region

if "bpo_holding_current" in emodel.responses:
threshold_keys = ("bpo_holding_current", "bpo_threshold_current")
if all(key in emodel.responses for key in threshold_keys):
dynamics_params = population.create_group("dynamics_params")
dynamics_params["holding_current"] = emodel.responses["bpo_holding_current"]
dynamics_params["threshold_current"] = emodel.responses["bpo_threshold_current"]
Expand Down

0 comments on commit 4b91b56

Please sign in to comment.