From 0ca00034947469ae8d93efd497a27b16717cf2d8 Mon Sep 17 00:00:00 2001 From: seangreaves Date: Thu, 24 Oct 2024 10:20:42 +0100 Subject: [PATCH] revert --- dashboard/Sugartrail.ipynb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dashboard/Sugartrail.ipynb b/dashboard/Sugartrail.ipynb index bd11da8..5c0ae91 100644 --- a/dashboard/Sugartrail.ipynb +++ b/dashboard/Sugartrail.ipynb @@ -151,25 +151,25 @@ "navigation_button = widgets.Button(description='Update', disabled=True)\n", "navigation_button.on_click(lambda bt: config_network()) \n", "\n", - "def init_network(bt):\n", - " init_button.disabled = True\n", - " company_id = company_text.value # Capture the latest value of company_text\n", - " response = sugartrail.api.get_company(str(company_id))\n", - " company_text.disabled = True\n", + "def init_network():\n", + " init_button.disabled=True\n", + " response = sugartrail.api.get_company(str(company_text.value))\n", + " company_text.disabled=True\n", " if response:\n", - " network.company_id = company_id\n", + " network.company_id = str(company_text.value)\n", " init_status.value = u'\\u2705: Initialisation successful for ' + str(response['company_name']) \n", - " init_button.button_style = 'success'\n", + " init_button.button_style='success'\n", " navigation_button.disabled = False\n", " depth_selector.disabled = False\n", " generate_network_button.disabled = False\n", - " logger.debug(f\"Company number entered: {company_id}\") # Log the captured value\n", + " logger.debug(f\"Company number entered: {str(company_text.value)}\")\n", + " \n", " else:\n", - " init_button.disabled = False\n", - " company_text.disabled = False\n", - " init_status.value = u'\\u274c: Initialisation Failed. No records for company: ' + company_id\n", + " init_button.disabled=False\n", + " company_text.disabled=False\n", + " init_status.value = u'\\u274c: Initialisation Failed. No records for company: ' + str(company_text.value)\n", "\n", - "display(company_text, init_button, init_status)\n" + "display(company_text, init_button, init_status)" ] }, {