Skip to content

Commit 376d6e2

Browse files
committed
FIX: Don't try to strptime something that's already a datetime
1 parent 6830e3a commit 376d6e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/utils/draw_gantt_chart.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def generate_gantt_chart(
540540
{
541541
k: (
542542
datetime.datetime.strptime(i[k], "%Y-%m-%dT%H:%M:%S.%f")
543-
if k in {"start", "finish"}
543+
if k in {"start", "finish"} and isinstance(i[k], str)
544544
else i[k]
545545
)
546546
for k in i

0 commit comments

Comments
 (0)