From 41937ca78db6890dde210fbdd877d1c4215ea2f5 Mon Sep 17 00:00:00 2001 From: Saran440 Date: Fri, 4 Oct 2024 15:33:31 +0700 Subject: [PATCH] [FIX] usability_webhooks: multi search_key --- usability_webhooks/controllers/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usability_webhooks/controllers/utils.py b/usability_webhooks/controllers/utils.py index 7457d46..55e98b6 100644 --- a/usability_webhooks/controllers/utils.py +++ b/usability_webhooks/controllers/utils.py @@ -194,7 +194,9 @@ def friendly_create_data(self, model, vals): def _search_object(self, model, vals): search_key = vals.get("search_key", {}) - search_domain = [(k, "=", v) for k, v in search_key.items()] + search_domain = [ + (k, "in" if isinstance(v, list) else "=", v) for k, v in search_key.items() + ] # Prepare Header Dict (non o2m) if not search_key: