opl_end时close_mtask 参数类型错误
This commit is contained in:
parent
dc5d3d184f
commit
cf26cc69a8
|
@ -64,9 +64,8 @@ def bind_opl(ticket: Ticket, transition: Transition, new_ticket_data: dict):
|
|||
def t_submit_close_mtask(ticket: Ticket, transition: Transition, new_ticket_data: dict):
|
||||
# 提交作业关闭时关闭作业监控
|
||||
opl = Opl.objects.filter(ticket=ticket).first()
|
||||
if opl and opl.mtask_uid:
|
||||
close_mtask(opl.mtask_uid)
|
||||
# 防止没变化,手动处理一下
|
||||
if opl:
|
||||
close_mtask(opl)
|
||||
|
||||
|
||||
def opl_audit_end(ticket: Ticket):
|
||||
|
@ -138,10 +137,10 @@ def opl_end(ticket: Ticket):
|
|||
"""
|
||||
作业许可证关闭时执行
|
||||
"""
|
||||
opl = ticket.opl
|
||||
if opl.mtask_uid:
|
||||
opl = Opl.objects.filter(ticket=ticket).first()
|
||||
if opl:
|
||||
# 关闭作业视频监控任务
|
||||
close_mtask(opl.mtask_uid)
|
||||
close_mtask(opl)
|
||||
operation = opl.operation
|
||||
opls = Opl.objects.filter(operation=operation)
|
||||
opls.filter(ticket=None).delete() # 删除无用许可证
|
||||
|
|
Loading…
Reference in New Issue