Skip to content

Commit bd5a632

Browse files
authored
Merge pull request #17 from CESNET/stac_id
fix overwrite ids with sentinel id instead of product title
2 parents 24c6387 + f38213a commit bd5a632

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

register_stac.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ def regenerate_href_links(stacfile_path, metadata_dir, product_url, salt):
293293
split_line[-2] = correct_link
294294
outfile.write('"'.join(split_line))
295295
elif '"id":' in line and salt:
296-
# prefix title, so unique UUID is generated if same product comes from different sources
296+
# prefix ID, so unique UUID is generated if same product comes from different sources
297297
split_line = line.split('": "')
298-
salted_line = split_line[0] + '": "' + salt + split_line[1]
298+
salted_line = split_line[0] + '": "' + salt + PRODUCT_ID + '",\n'
299299
outfile.write(salted_line)
300300
else:
301301
outfile.write(line)

0 commit comments

Comments
 (0)