From e2c2061cde6f5dbd9869e3d5a84189d93382f3a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B3=E9=88=9E?= Date: Tue, 3 Sep 2024 19:51:45 +0800 Subject: [PATCH] fix(api): position map sorting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/langgenius/dify/issues/3981 TypeError: '<' not supported between instances of 'NoneType' and 'int' Signed-off-by: 陳鈞 --- api/core/extension/extensible.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/extension/extensible.py b/api/core/extension/extensible.py index 0296126d8b094f..8d73aa2b8bab8c 100644 --- a/api/core/extension/extensible.py +++ b/api/core/extension/extensible.py @@ -65,7 +65,7 @@ def scan_extensions(cls): if os.path.exists(builtin_file_path): with open(builtin_file_path, encoding='utf-8') as f: position = int(f.read().strip()) - position_map[extension_name] = position + position_map[extension_name] = position if (extension_name + '.py') not in file_names: logging.warning(f"Missing {extension_name}.py file in {subdir_path}, Skip.")