feat: 获取该批次的dag数据需要传入version
This commit is contained in:
parent
be57fec29f
commit
c8d05bed68
|
|
@ -961,9 +961,9 @@ def mlog_audit_end(ticket: Ticket):
|
||||||
mlog_submit(ins, ticket.create_by, now)
|
mlog_submit(ins, ticket.create_by, now)
|
||||||
|
|
||||||
|
|
||||||
def get_batch_dag(batch_number: str):
|
def get_batch_dag(batch_number: str, version=1):
|
||||||
try:
|
try:
|
||||||
batch_ins = BatchSt.objects.get(batch=batch_number)
|
batch_ins = BatchSt.objects.get(batch=batch_number, version=version)
|
||||||
except Exception:
|
except Exception:
|
||||||
raise ParseError("该批次号未构建关系链")
|
raise ParseError("该批次号未构建关系链")
|
||||||
# 收集所有相关批次和边
|
# 收集所有相关批次和边
|
||||||
|
|
|
||||||
|
|
@ -816,6 +816,7 @@ class BatchLogViewSet(ListModelMixin, CustomGenericViewSet):
|
||||||
获取该批次的DAG图数据
|
获取该批次的DAG图数据
|
||||||
"""
|
"""
|
||||||
batch = request.data.get("batch", None)
|
batch = request.data.get("batch", None)
|
||||||
|
version = request.data.get("version", 1)
|
||||||
if not batch:
|
if not batch:
|
||||||
raise ParseError("缺少batch参数")
|
raise ParseError("缺少batch参数")
|
||||||
return Response(get_batch_dag(batch))
|
return Response(get_batch_dag(batch, version))
|
||||||
Loading…
Reference in New Issue