This is an automated email from the ASF dual-hosted git repository. skperez pushed a commit to branch SDAP-397 in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
commit 80c43c460c7242347a87a960201463ec725373a1 Author: skorper <[email protected]> AuthorDate: Tue Jul 19 23:51:53 2022 -0700 Pull ID from insitu api response --- analysis/webservice/algorithms_spark/Matchup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/analysis/webservice/algorithms_spark/Matchup.py b/analysis/webservice/algorithms_spark/Matchup.py index a0c83eb..d6d850f 100644 --- a/analysis/webservice/algorithms_spark/Matchup.py +++ b/analysis/webservice/algorithms_spark/Matchup.py @@ -517,10 +517,12 @@ class DomsPoint(object): ) if var_value]) point.data = data - try: - point.data_id = str(edge_point['id']) - except KeyError: - point.data_id = "%s:%s:%s" % (point.time, point.longitude, point.latitude) + if 'id' in edge_point: + point.data_id = edge_point['id'] + elif 'platform' in edge_point and 'id' in edge_point['platform']: + point.data_id = edge_point['platform']['id'] + else: + point.data_id = f'{point.time}:{point.longitude}:{point.latitude}' return point
