fix: correct WorldQuant daily alpha date filters
Deploy production / deploy (push) Successful in 52s
Deploy production / deploy (push) Successful in 52s
This commit is contained in:
@@ -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 = (
|
||||
|
||||
Reference in New Issue
Block a user