Skip to content

Commit

Permalink
Fix variable naming in deserialize_callable (#8461)
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje authored Oct 17, 2024
1 parent 7788bfe commit 54104e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions haystack/utils/callable_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def deserialize_callable(callable_handle: str) -> Optional[Callable]:
module = sys.modules.get(module_name, None)
if not module:
raise DeserializationError(f"Could not locate the module of the callable: {module_name}")
streaming_callback = getattr(module, function_name, None)
if not streaming_callback:
deserialized_callable = getattr(module, function_name, None)
if not deserialized_callable:
raise DeserializationError(f"Could not locate the callable: {function_name}")
return streaming_callback
return deserialized_callable

0 comments on commit 54104e9

Please sign in to comment.