feat: ofm -修改 view 字段

This commit is contained in:
TianyangZhang 2025-11-18 14:14:31 +08:00
parent fb87fead4f
commit 4157dd7aa6
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ class VehicleUseViewSet(CustomModelViewSet):
def add_info_for_list(self, data):
vehicle_ids = [d["id"] for d in data]
slots = VehicleSlot.objects.filter(vehicle__in=vehicle_ids).order_by("vehreg", "vehicle_use", "vdate", "slot")
slots = VehicleSlot.objects.filter(vehicle_use__in=vehicle_ids).order_by("vehreg", "vehicle_use", "vdate", "slot")
vehicle_info = {}
for slot in slots:
vehicle_id = slot.vehicle_use.id