Fix enum checking
This commit is contained in:
@@ -117,7 +117,7 @@ def set_pipe_minor_loss(name: str, id: str, minor_loss: float) -> ChangeSet:
|
||||
|
||||
|
||||
def set_pipe_status(name: str, id: str, status: float) -> ChangeSet:
|
||||
if status is not PIPE_STATUS_OPEN or status is not PIPE_STATUS_CLOSED or status is not PIPE_STATUS_CV:
|
||||
if status != PIPE_STATUS_OPEN and status != PIPE_STATUS_CLOSED and status != PIPE_STATUS_CV:
|
||||
return ChangeSet()
|
||||
|
||||
return _set_pipe(name, id, 'status', 'str', str(status))
|
||||
|
||||
Reference in New Issue
Block a user