diff --git a/backend/geonature/core/gn_meta/models/aframework.py b/backend/geonature/core/gn_meta/models/aframework.py index c75ea2eef1..15f53d0770 100644 --- a/backend/geonature/core/gn_meta/models/aframework.py +++ b/backend/geonature/core/gn_meta/models/aframework.py @@ -321,7 +321,7 @@ def filter_by_params(cls, params={}, *, _ds_search=True, query=None): else: #sinon découpe sur les espaces pour rechercher dans le nom ands = []; - for term in search.split(' '): + for term in search.split(" "): if len(term) > 0: ands.append(func.unaccent(TAcquisitionFramework.acquisition_framework_name).ilike(func.unaccent(f"%{term}%"))) ors = [sa.and_(*ands)] diff --git a/backend/geonature/core/gn_meta/models/datasets.py b/backend/geonature/core/gn_meta/models/datasets.py index efc1ec7340..18da1f3f5e 100644 --- a/backend/geonature/core/gn_meta/models/datasets.py +++ b/backend/geonature/core/gn_meta/models/datasets.py @@ -278,12 +278,12 @@ class DatasetFilterSchema(MetadataFilterSchema): if search.isdigit(): ors = [ func.unaccent(cls.dataset_name).ilike(func.unaccent(f"%{search}%")), - sa.cast(cls.id_dataset, sa.String) == search + sa.cast(cls.id_dataset, sa.String) == search, ] else: #sinon découpe sur les espaces pour rechercher dans le nom ands = []; - for term in search.split(' '): + for term in search.split(" "): if len(term) > 0: ands.append(func.unaccent(cls.dataset_name).ilike(func.unaccent(f"%{term}%"))) ors = [sa.and_(*ands)]