Skip to content

Commit

Permalink
fix bug: IsNoneOrEmpty node
Browse files Browse the repository at this point in the history
  • Loading branch information
lldacing committed Oct 30, 2024
1 parent 26267c4 commit e154998
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions easyapi/UtilNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ def INPUT_TYPES(s):
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)):
Expand All @@ -779,7 +779,7 @@ def execute(self, any):
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:
Expand All @@ -800,7 +800,7 @@ def INPUT_TYPES(s):
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)):
Expand All @@ -811,7 +811,7 @@ def execute(self, any, default=None):
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)):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"]

Expand Down

0 comments on commit e154998

Please sign in to comment.