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