fix: correct WorldQuant daily alpha date filters
Deploy production / deploy (push) Successful in 52s

This commit is contained in:
yuxuanhui
2026-09-09 15:12:45 +08:00
parent 4debca7dbd
commit ff840ca140
3 changed files with 30 additions and 10 deletions
+5 -3
View File
@@ -163,7 +163,9 @@ def create_test_app():
r for r in records if (r["status"] == "UNSUBMITTED") == unsubmitted and r["hidden"] == hidden
]
for field in ("dateCreated", "dateSubmitted"):
for suffix in (">=", "<"):
if field + ">=" in request.url.params:
return httpx.Response(400, json=["Expected ISO 8601 datetime with timezone"])
for suffix in (">", "<"):
boundary = request.url.params.get(field + suffix)
if boundary:
bound = datetime.fromisoformat(boundary).replace(tzinfo=timezone.utc)
@@ -173,8 +175,8 @@ def create_test_app():
if r.get(field)
and (
datetime.fromisoformat(r[field]) >= bound
if suffix == ">="
else datetime.fromisoformat(r[field]) < bound
if suffix == ">"
else datetime.fromisoformat(r[field]) <= bound
)
]
offset, limit = (