From 89d64b9a4c6180a312e988fb0be7dba97a8c5ade Mon Sep 17 00:00:00 2001 From: Regis Camimura Date: Fri, 6 Aug 2021 14:13:14 -0300 Subject: [PATCH] filters for arrays --- worf/views/list.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/worf/views/list.py b/worf/views/list.py index 7c1ce4f..d889a68 100644 --- a/worf/views/list.py +++ b/worf/views/list.py @@ -111,7 +111,14 @@ def set_search_lookup_kwargs(self): if isinstance(self.bundle[key], list): if not all(isinstance(x, int) for x in self.bundle[key]): self.coerce_array_of_integers(key) # raises 422 if failure - self.lookup_kwargs.update({f"{key}__in": self.bundle[key]}) + self.lookup_kwargs.update( + { + f"{key}__in": ",".join( + str(value) for value in self.bundle[key] + ) + } + ) + continue self.validate_bundle(key)