Skip to content

Commit

Permalink
fix: Update metadata handling in finder (#326)
Browse files Browse the repository at this point in the history
Update metadata handling in finder
  • Loading branch information
manasaV3 authored Oct 17, 2024
1 parent 03d0d88 commit 4289210
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions ingestion_tools/dataset_configs/deposition_10301.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
alignments:
- metadata:
sources:
- sources:
- destination_glob:
list_glob: "{run_output_path}/Alignments/100/alignment_metadata.json"
match_regex: .*
Expand Down
6 changes: 3 additions & 3 deletions ingestion_tools/scripts/common/finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ def _get_instantiated_results(
if len(filtered_results) > 1:
raise Exception("Multiple metadata files found for a single entity")
metadata_path = next(iter(filtered_results.values()))
remote_metadata = get_remote_json(metadata_path, config)
name, path, filtered_results = self.importer_cls.get_name_and_path(remote_metadata, None, None, filtered_results)
metadata = get_remote_json(metadata_path, config)
name, path, filtered_results = self.importer_cls.get_name_and_path(metadata, None, None, filtered_results)

names = ",".join([os.path.basename(path) for path in filtered_results])
names = ",".join([os.path.basename(path) for path in filtered_results if path])
item = self.importer_cls(
config=config,
metadata=metadata,
Expand Down

0 comments on commit 4289210

Please sign in to comment.