From 89f9a2290959b5a1783c1cf6806c951ce77e3291 Mon Sep 17 00:00:00 2001 From: Luiz Costa Date: Tue, 21 Nov 2023 12:28:59 +0000 Subject: [PATCH] fix function to get data --- fleet_management/traccar_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fleet_management/traccar_api.py b/fleet_management/traccar_api.py index 1b6b0f8..3814d33 100644 --- a/fleet_management/traccar_api.py +++ b/fleet_management/traccar_api.py @@ -28,7 +28,7 @@ def get_devices(doc=None): should also be able to be called frequently to update the status""" # get informations for authentication on traccar server - ts = frappe.get_last_doc('Traccar Settings') + ts = frappe.get_doc('Traccar Settings') # get all devices from traccar server try: @@ -68,7 +68,7 @@ def get_trips_for_device(device_id, start=None, end=None): Fetches all trips for a device, stores them in Trip Doctype, and links them to the vehicle assigned to the device. """ # get information for authentication on traccar server - ts = frappe.get_last_doc('Traccar Settings') + ts = frappe.get_doc('Traccar Settings') # Define default start and end datetime if not provided if not start: