diff --git a/slop_with_models.py b/slop_with_models.py index e65a3d4..4ac055f 100644 --- a/slop_with_models.py +++ b/slop_with_models.py @@ -770,6 +770,10 @@ def list_resources(): def get_resource(resource_id): logger.info(f"Received /resources/{resource_id} GET request") with resource_lock: + # Reload resources to ensure we have the latest state + global resources + resources = load_resources_from_file() + logger.debug(f"Resources after reload: {list(resources.keys())}") if resource_id in resources: resource = resources[resource_id] logger.debug(f"Exact match found for {resource_id}: {resource}")