From 5a605038df0876cdc58e4b650132ff62970f0b0fdbe47f58c7e66a438b309361 Mon Sep 17 00:00:00 2001 From: PioApocalypse Date: Thu, 12 Feb 2026 15:09:18 +0100 Subject: [PATCH] fixes small residual from copy-paste in call_material_from_elabid the fix changes "sample_data" - which was residual from copy-pasting the call_entrypoint... function and therefore undefined - with "material_data" which is very well defined in the previous line --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index b98cd33..fcab2d1 100644 --- a/src/main.py +++ b/src/main.py @@ -29,7 +29,7 @@ def call_material_from_elabid(elabid): try: material_data = APIHandler(apikey).get_entry_from_elabid(elabid, entryType="items") # TO-DO: correct this typo on elabftw: Subtrate → Substrate. - if not sample_data.get("category_title") in ["PLD Target", "Substrate batch", "Subtrate batch"]: + if not material_data.get("category_title") in ["PLD Target", "Substrate batch", "Subtrate batch"]: raise ValueError(f"The referenced resource (elabid = {elabid}) is not a material.") material_object = Material(material_data) except ConnectionError as e: