From 2f5d052ebd4fb280c55364e3c17d3bd7936cae3d Mon Sep 17 00:00:00 2001 From: Fred C <42280769+hypsug0@users.noreply.github.com> Date: Thu, 8 Feb 2024 00:03:41 +0100 Subject: [PATCH] fix #109 --- plugin_qgis_lpo/commons/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin_qgis_lpo/commons/helpers.py b/plugin_qgis_lpo/commons/helpers.py index d4d016b..c9895e6 100644 --- a/plugin_qgis_lpo/commons/helpers.py +++ b/plugin_qgis_lpo/commons/helpers.py @@ -120,7 +120,8 @@ def sql_taxons_filter_builder(taxons_dict: Dict) -> Optional[str]: rank_filters = [] for key, value in taxons_dict.items(): if value: - rank_filters.append(f"{key} in {str(tuple(value))}") + value_list = ",".join([f"'{v}'" for v in value]) + rank_filters.append(f"{key} in ({value_list})") if len(rank_filters) > 0: taxons_where = f"({' or '.join(rank_filters)})" return taxons_where