feat: 优化batches_to
This commit is contained in:
parent
fa221218f9
commit
ff2b098210
|
@ -718,7 +718,7 @@ class BatchLog(BaseModel):
|
|||
|
||||
@classmethod
|
||||
def batches_to(cls, batch:str):
|
||||
batches = BatchLog.objects.filter(source__batch=batch).values_list("target__batch", flat=True).distinct()
|
||||
batches = BatchLog.objects.filter(source__batch=batch, relation_type="split").values_list("target__batch", flat=True).distinct()
|
||||
batches = sorted(list(batches), key=custom_key)
|
||||
last_batch_num = None
|
||||
if batches:
|
||||
|
|
Loading…
Reference in New Issue