From 5c8f057db0cc6c56d8f7ca42d56a369e2502c225 Mon Sep 17 00:00:00 2001 From: Mafaldarc <38542491+Mafaldarc@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:42:59 +0000 Subject: [PATCH] Revert pydantic method 'model_validate_json' to v1 version (#1596) Fix bug when trying to process Elasticsearch CQL_JSON data on post_collection_items Use method 'parse_raw' from v1 instead 'model_validate_json' --- pygeoapi/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygeoapi/api.py b/pygeoapi/api.py index 97fb2cd..899f5ea 100644 --- a/pygeoapi/api.py +++ b/pygeoapi/api.py @@ -2270,7 +2270,7 @@ class API: else: LOGGER.debug('processing Elasticsearch CQL_JSON data') try: - filter_ = CQLModel.model_validate_json(data) + filter_ = CQLModel.parse_raw(data) except Exception as err: LOGGER.error(err) msg = f'Bad CQL string : {data}'