You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by sk...@apache.org on 2022/07/20 08:27:24 UTC
[incubator-sdap-nexus] 02/04: Pull ID from insitu api response
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 <st...@gmail.com>
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