fix function to get data

This commit is contained in:
Luiz Costa 2023-11-21 12:28:59 +00:00
parent bc1f312e81
commit 89f9a22909

View File

@ -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: