fix(cron): also coerce null createdAtMs/updatedAtMs on load

Same present-null footgun as runHistory; route all required store
ints through _store_int.
This commit is contained in:
santhreal
2026-07-21 13:45:02 +08:00
committed by Xubin Ren
parent 0b1b02f187
commit b6156fdd79
2 changed files with 9 additions and 9 deletions
+4 -2
View File
@@ -1032,8 +1032,8 @@ def test_load_jobs_accepts_null_run_history_ms(tmp_path) -> None:
{"runAtMs": None, "status": "ok", "durationMs": None},
],
},
"createdAtMs": 0,
"updatedAtMs": 0,
"createdAtMs": None,
"updatedAtMs": None,
}
],
}
@@ -1046,3 +1046,5 @@ def test_load_jobs_accepts_null_run_history_ms(tmp_path) -> None:
assert jobs[0].state.run_history[0].run_at_ms == 0
assert jobs[0].state.run_history[0].duration_ms == 0
assert jobs[0].state.run_history[0].status == "ok"
assert jobs[0].created_at_ms == 0
assert jobs[0].updated_at_ms == 0