From 9670f1d8017aadb2857bc70eda04b8b9eeed219f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enes=20Sad=C4=B1k=20=C3=96zbek?= Date: Sun, 7 Jan 2024 18:05:11 +0300 Subject: [PATCH] Args might not be always strings --- modules/api/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api/api.py b/modules/api/api.py index 5fd57e9f6..2f7f9ab38 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -275,7 +275,7 @@ class Api: def sanitize_args(self, args: list): for idx in range(0, len(args)): - if len(args[idx]) >= 1000: + if isinstance(args[idx], str) and len(args[idx]) >= 1000: args[idx] = f"" def sanitize_img_gen_request(self, request, img_gen_type: str):