From 72f359df8751233bd9a328a586eb5861d0a6757b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 19 Feb 2025 16:17:22 +0100 Subject: [PATCH 1/2] fixbug --- api/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/views.py b/api/views.py index 188bcd7..34740e6 100644 --- a/api/views.py +++ b/api/views.py @@ -127,12 +127,12 @@ class NewSnapshotView(ApiMixing): logger.error("Error: No property for uuid: %s", ev_uuid) return JsonResponse({'status': 'fail'}, status=500) - url_args = reverse_lazy("device:details", args=(property.value,)) + url_args = reverse_lazy("device:details", args=(prop.value,)) url = request.build_absolute_uri(url_args) response = { "status": "success", - "dhid": property.value[:6].upper(), + "dhid": prop.value[:6].upper(), "url": url, # TODO replace with public_url when available "public_url": url From 509c54e5d8f3a0c5f5b5bbb3b029bf2b09a3c5bf Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 19 Feb 2025 18:21:29 +0100 Subject: [PATCH 2/2] get better the speed of network --- evidence/normal_parse_details.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evidence/normal_parse_details.py b/evidence/normal_parse_details.py index 9c24b70..67aac81 100644 --- a/evidence/normal_parse_details.py +++ b/evidence/normal_parse_details.py @@ -298,13 +298,17 @@ class ParseSnapshot: if get_inxi(n, "type") == "USB": interface = "USB" + speed = get_inxi(iface, "speed") + if not speed: + speed = get_inxi(n, "speed") + self.components.append( { "type": "NetworkAdapter", "model": model, "manufacturer": get_inxi(n, 'vendor'), "serialNumber": get_inxi(iface, 'mac'), - "speed": get_inxi(n, "speed"), + "speed": speed, "interface": interface, } )