opm start_mtask 关闭不可开启
This commit is contained in:
parent
eda09432f4
commit
940f07033c
|
@ -114,7 +114,7 @@ class OplViewSet(CustomModelViewSet):
|
||||||
开启作业监控
|
开启作业监控
|
||||||
"""
|
"""
|
||||||
obj = self.get_object()
|
obj = self.get_object()
|
||||||
if obj.operation.state != Operation.OP_DONE:
|
if obj.operation.state == Operation.OP_DONE:
|
||||||
raise ParseError('作业已关闭,不能开启监控')
|
raise ParseError('作业已关闭,不能开启监控')
|
||||||
res = start_mtask(obj)
|
res = start_mtask(obj)
|
||||||
return Response(res)
|
return Response(res)
|
||||||
|
|
Loading…
Reference in New Issue