修复:校验托盘状态类型
This commit is contained in:
@@ -32,7 +32,8 @@ class PalletStateMachine:
|
||||
current: PalletFlowState,
|
||||
target: PalletFlowState,
|
||||
) -> None:
|
||||
if not isinstance(current, PalletFlowState) or not isinstance(target, PalletFlowState):
|
||||
raise TypeError('current 和 target 必须是 PalletFlowState')
|
||||
|
||||
if (current, target) not in cls._ALLOWED_TRANSITIONS:
|
||||
raise InvalidPalletTransition(
|
||||
f'不允许的托盘状态迁移:{current.value} -> {target.value}'
|
||||
)
|
||||
raise InvalidPalletTransition(f'不允许的托盘状态迁移:{current.value} -> {target.value}')
|
||||
|
||||
Reference in New Issue
Block a user