We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fb759a commit 92f9af6Copy full SHA for 92f9af6
io-met.py
@@ -18,8 +18,10 @@ def add_hysds_io(rest_url, metadata):
18
19
# copy existing allowed accounts
20
if doc is not None:
21
- metadata['allowed_accounts'] = list(metadata['allowed_accounts'] +
22
- doc['result'].get('allowed_accounts', []))
+ merged_accounts = list(set(metadata.get('allowed_accounts', []) +
+ doc['result'].get('allowed_accounts', [])))
23
+ if len(merged_accounts) > 0:
24
+ metadata['allowed_accounts'] = merged_accounts
25
26
# index
27
requests_json_response("POST", os.path.join(rest_url ,"hysds_io/add"),
0 commit comments