From e24e75790b6227f5323be3e8de73af72f767475c Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 20 Dec 2024 13:34:20 +0200 Subject: [PATCH] fix --- src/sempy_labs/_job_scheduler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sempy_labs/_job_scheduler.py b/src/sempy_labs/_job_scheduler.py index 9742119..34cf391 100644 --- a/src/sempy_labs/_job_scheduler.py +++ b/src/sempy_labs/_job_scheduler.py @@ -74,6 +74,7 @@ def list_item_job_instances( dfs = [] for r in responses: for v in r.get("value", []): + fail = v.get("failureReason", {}) new_data = { "Job Instance Id": v.get("id"), "Item Name": item_name, @@ -85,7 +86,7 @@ def list_item_job_instances( "Root Activity Id": v.get("rootActivityId"), "Start Time UTC": v.get("startTimeUtc"), "End Time UTC": v.get("endTimeUtc"), - "Failure Reason": v.get("failureReason"), + "Error Message": fail.get('message') if fail is not None else "", } dfs.append(pd.DataFrame(new_data, index=[0]))