Skip to content

Commit

Permalink
touch up interface for always-include option
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed Feb 15, 2024
1 parent 8c93ba4 commit 96fadd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xnat_ingest/cli/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"specified in a column or not. Specified using the scan types IANA mime-type or "
"fileformats \"mime-like\" (see https://arcanaframework.github.io/fileformats/), "
"e.g. 'application/json', 'medimage/dicom-series', "
"'image/jpeg'). Use 'core/file-set' to include all file-types in the session"
"'image/jpeg'). Use 'all' to include all file-types in the session"
),
)
@click.option(
Expand Down
5 changes: 4 additions & 1 deletion xnat_ingest/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ def select_resources(

uploaded = set()
for mime_like in always_include:
fileformat = from_mime(mime_like)
if mime_like == "all":
fileformat = FileSet
else:
fileformat = from_mime(mime_like)
for scan in self.scans.values():
for resource_name, fileset in scan.resources.items():
if isinstance(fileset, fileformat):
Expand Down

0 comments on commit 96fadd7

Please sign in to comment.