From 70e49eb27ea77da6527ab29e9ee5a385a47dcc2f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 16 Jan 2026 14:00:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20batchst=E6=94=AF=E6=8C=81=E8=BF=94?= =?UTF-8?q?=E5=9B=9Esource=5Fnear=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 29e2074f..4e19926d 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -1078,7 +1078,8 @@ class BatchStViewSet(CustomListModelMixin, ComplexQueryMixin, CustomGenericViewS filterset_class = BatchStFilter def add_info_for_list(self, data): - if self.request.query_params.get("with_source_near", None) == "yes": + if (self.request.query_params.get("with_source_near", None) == "yes" or + self.request.data.get("with_source_near", None) == "yes"): batchstIds = [ins["id"] for ins in data] batchlog_qs = BatchLog.objects.filter(target__id__in=batchstIds).values("id", "source", "target") source_data = BatchStSerializer(instance=BatchSt.objects.filter(id__in=[ins["source"] for ins in batchlog_qs]), many=True).data