kid control fixes

This commit is contained in:
Arseniy Kuznetsov
2023-12-18 15:20:33 +01:00
parent 39ec208ff8
commit b38d099212
3 changed files with 17 additions and 31 deletions

View File

@@ -24,7 +24,11 @@ class KidDeviceMetricsDataSource:
if metric_labels is None:
metric_labels = []
try:
device_records = router_entry.api_connection.router_api().get_resource('/ip/kid-control/device').get()
device_records = []
records = router_entry.api_connection.router_api().get_resource('/ip/kid-control/device').get()
for record in records:
if record.get('user'):
device_records.append(record)
return BaseDSProcessor.trimmed_records(router_entry, router_records=device_records, metric_labels=metric_labels)
except Exception as exc:
print(