Skip to content

Commit cceb76d

Browse files
yarikopticmgxd
andauthored
enh: whitespace alone not good enough
Co-Authored-By: mgxd <[email protected]>
1 parent b7aa163 commit cceb76d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

heudiconv/dicoms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def group_dicoms_into_seqinfos(files, file_filter, dcmfilter, grouping):
7777
try:
7878
mw.dcm_data.ProtocolName
7979
except AttributeError:
80-
mw.dcm_data.ProtocolName = parse_private_csa_header(mw.dcm_data, 'ProtocolName', 'tProtocolName') if mw.is_csa else ''
80+
if not getattr(mw.dcm_data, 'ProtocolName', '').strip():
81+
mw.dcm_data.ProtocolName = parse_private_csa_header(mw.dcm_data, 'ProtocolName', 'tProtocolName') \
82+
if mw.is_csa else ''
8183

8284
try:
8385
series_id = (int(mw.dcm_data.SeriesNumber),

0 commit comments

Comments
 (0)