Skip to content

Commit

Permalink
Simplify new code setup observation
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Dec 17, 2024
1 parent b6e4c5c commit 70fcce8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion code_setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,15 @@
"metadata": {},
"outputs": [],
"source": [
"widget.quick_setup_button.on_click(lambda _: render())"
"def on_code_setup_message_change(change):\n",
" if \"created\" in change[\"new\"]:\n",
" render()\n",
"\n",
"\n",
"widget.aiida_code_setup.observe(\n",
" on_code_setup_message_change,\n",
" \"message\",\n",
")"
]
}
],
Expand Down

0 comments on commit 70fcce8

Please sign in to comment.