fix: fix datetime handling for python

This commit is contained in:
Ruben Fiszel
2023-09-03 11:19:22 +02:00
parent ffcb977c47
commit b35ffd435d
2 changed files with 1 additions and 3 deletions

View File

@@ -22,7 +22,6 @@ jobs:
image: ghcr.io/windmill-labs/windmill:main
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
RUST_LOG: info
options: >-
--pull always --health-interval 10s --health-timeout 5s
--health-retries 5 --health-cmd "curl

View File

@@ -280,8 +280,7 @@ pub async fn handle_python_job(
let name = &x.name;
format!(
"if \"{name}\" in kwargs and kwargs[\"{name}\"] is not None:\n \
kwargs[\"{name}\"] = datetime.strptime(kwargs[\"{name}\"], \
'%Y-%m-%dT%H:%M')\n",
kwargs[\"{name}\"] = datetime.fromisoformat(kwargs[\"{name}\"])\n",
)
}
_ => "".to_string(),