nipy / heudiconv

Flexible DICOM conversion into structured directory layouts
https://heudiconv.readthedocs.io
Other
232 stars 125 forks source link

fix code failure when dicom time fields are empty #755

Closed jennan closed 3 months ago

jennan commented 3 months ago

Hello,

This pull request is meant to fix an error we are encountering when processing data with empty date/time fields due to anonymization. Please note the fields are not missing but contain an empty string.

I have adapted the code of get_datetime_from_dcm to handle this scenario the same way as if the date/time was missing.

Please let me know if you need more details or changes to this pull request.

Thank you :).

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.04%. Comparing base (424dcdc) to head (0821456). Report is 1 commits behind head on master.

:exclamation: Current head 0821456 differs from pull request most recent head 7342206. Consider uploading reports for the commit 7342206 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #755 +/- ## ======================================= Coverage 82.04% 82.04% ======================================= Files 42 42 Lines 4205 4205 ======================================= Hits 3450 3450 Misses 755 755 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jennan commented 3 months ago

Hi @yarikoptic , sorry for the delay. I have included your changes, but I am equally happy if you merge https://github.com/nipy/heudiconv/pull/756 and close this PR :-).

github-actions[bot] commented 3 months ago

:rocket: Issue was released in v1.1.1 :rocket: