Skip to content

Commit e8a9dbf

Browse files
author
King Long Tse
committed
dont run strptime when input is empty
1 parent 81501fd commit e8a9dbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

labelbox/schema/project.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,9 @@ def _validate_datetime(string_date: str) -> bool:
318318
return True
319319
except ValueError:
320320
pass
321-
raise ValueError(f"""Incorrect format for: {string_date}.
322-
Format must be \"YYYY-MM-DD\" or \"YYYY-MM-DD hh:mm:ss\"""")
321+
raise ValueError(f"""Incorrect format for: {string_date}.
322+
Format must be \"YYYY-MM-DD\" or \"YYYY-MM-DD hh:mm:ss\"""")
323+
return True
323324

324325
sleep_time = 2
325326
id_param = "projectId"

0 commit comments

Comments
 (0)