Skip to content

Normalize datetime strings in querybuilder endpoint payloads - #190

Open
edan-bainglass wants to merge 2 commits into
partially-simplify-query-paramsfrom
minor-qb-fixes
Open

edan-bainglass wants to merge 2 commits into
partially-simplify-query-paramsfrom
minor-qb-fixes

Conversation

@edan-bainglass

@edan-bainglass edan-bainglass commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Based on #187

The REST endpoint accepts incoming datetime strings inside QueryBuilder filters. Those filters are typed as arbitrary JSON values, so Pydantic leaves them as strings; the endpoint must convert them to Python datetime objects before passing them to AiiDA’s QueryBuilder.

The Z replacement is for Python 3.10 compatibility: datetime.fromisoformat() in Python 3.10 doesn’t accept a trailing Z, while it does accept +00:00.

Peripheral

Added the project_map field to the QueryBuilderDict schema to match the AiiDA QueryBuilder dictionary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant