Skip to content

Commit

Permalink
IWF-357: Address MR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lwolczynski committed Jan 6, 2025
1 parent c5df9ca commit 1f3c0dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions iwf/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def get_to_trigger_state_movements(self) -> list[StateMovement]:
return self._state_movements

def get_internal_channel_size(self, channel_name):
registered_type = self._internal_channel_type_store.get_type(channel_name)
is_type_registered = self._internal_channel_type_store.is_valid_name_or_prefix(channel_name)

if registered_type is None:
if is_type_registered is False:
raise WorkflowDefinitionError(
f"InternalChannel channel_name is not defined {channel_name}"
)
Expand Down
2 changes: 1 addition & 1 deletion iwf/type_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_type(self, name: str) -> Optional[type]:

def add_internal_channel_def(self, obj: CommunicationMethod):
if self._class_type != Type.INTERNAL_CHANNEL:
raise WorkflowDefinitionError(
raise ValueError(
f"Cannot add internal channel definition to {self._class_type}"
)
self._do_add_to_store(obj.is_prefix, obj.name, obj.value_type)
Expand Down

0 comments on commit 1f3c0dc

Please sign in to comment.