From d6c6803aed1986b3b6f76f220b1d3bbf4b262bf5 Mon Sep 17 00:00:00 2001 From: Timothy Lee Date: Thu, 29 Dec 2022 12:14:02 +0800 Subject: [PATCH] Fix null endTime when run status is not finished Signed-off-by: Timothy Lee --- primehub/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/primehub/models.py b/primehub/models.py index 986b7da..9d8f161 100644 --- a/primehub/models.py +++ b/primehub/models.py @@ -226,8 +226,9 @@ def list_runs(self, experiment_name: str): 'experimentId': r['info']['experimentId'], 'status': r['info']['status'], 'startTime': timestamp_to_isoformat(r['info']['startTime']), - 'endTime': timestamp_to_isoformat(r['info']['endTime']), } + if r['info'].get('endTime'): + m['endTime'] = timestamp_to_isoformat(r['info']['endTime']) yield m return results