From e154998ec6e3be10953885a7ed1cf1eaf93749ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=9B=AA=E5=B3=B0?= Date: Wed, 30 Oct 2024 19:03:20 +0800 Subject: [PATCH] fix bug: IsNoneOrEmpty node --- easyapi/UtilNode.py | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/easyapi/UtilNode.py b/easyapi/UtilNode.py index 1576560..72550cc 100644 --- a/easyapi/UtilNode.py +++ b/easyapi/UtilNode.py @@ -770,7 +770,7 @@ class IsNoneOrEmpty: CATEGORY = "EasyApi/Utils" DESCRIPTION = "判断输入是否为None、空列表、空字符串(trim后判断)、空字典" - def execute(self, any): + def execute(self, any=None): if any is None: return True, if isinstance(any, (list, tuple)): @@ -779,7 +779,7 @@ class IsNoneOrEmpty: return (True if len(any.strip()) == 0 else False,) if isinstance(any, dict): return (True if len(any) == 0 else False,) - return False + return False, class IsNoneOrEmptyOptional: @@ -800,7 +800,7 @@ class IsNoneOrEmptyOptional: CATEGORY = "EasyApi/Utils" DESCRIPTION = "判断输入any是否为None、空列表、空字符串(trim后判断)、空字典,若为true,返回default的值,否则返回输入值" - def execute(self, any, default=None): + def execute(self, any=None, default=None): if any is None: return default, if isinstance(any, (list, tuple)): @@ -811,7 +811,7 @@ class IsNoneOrEmptyOptional: return (default if len(any) == 0 else any,) return (any,) - def check_lazy_status(self, any, default=None): + def check_lazy_status(self, any=None, default=None): if any is None: return ["default"] if isinstance(any, (list, tuple)): diff --git a/pyproject.toml b/pyproject.toml index a89d0f5..42192c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-easyapi-nodes" description = "Provides some features and nodes related to API calls." -version = "1.0.7" +version = "1.0.8" license = { file = "LICENSE" } dependencies = ["segment_anything", "simple_lama_inpainting", "insightface"]