mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
minor tweak to conditions and event handling
This commit is contained in:
@@ -111,7 +111,6 @@ def and_(*conditions):
|
|||||||
elif isinstance(condition, str):
|
elif isinstance(condition, str):
|
||||||
methods.append(condition)
|
methods.append(condition)
|
||||||
elif callable(condition):
|
elif callable(condition):
|
||||||
# Extract the __name__ even if the function is wrapped by a decorator
|
|
||||||
methods.append(getattr(condition, "__name__", repr(condition)))
|
methods.append(getattr(condition, "__name__", repr(condition)))
|
||||||
else:
|
else:
|
||||||
raise ValueError("Invalid condition in and_()")
|
raise ValueError("Invalid condition in and_()")
|
||||||
|
|||||||
Reference in New Issue
Block a user