diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index b7a8298b..8c483268 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -594,12 +594,18 @@ class SnapshotListView(GenericMixin): ).order_by(SnapshotsLog.created.desc()) logs = {} for snap in snapshots_log: + try: + system_uuid = snap.snapshot.device.system_uuid or '' + except AttributeError: + system_uuid = '' + if snap.snapshot_uuid not in logs: logs[snap.snapshot_uuid] = { 'sid': snap.sid, 'snapshot_uuid': snap.snapshot_uuid, 'version': snap.version, 'device': snap.get_device(), + 'system_uuid': system_uuid, 'status': snap.get_status(), 'severity': snap.severity, 'created': snap.created, diff --git a/ereuse_devicehub/templates/inventory/snapshots_list.html b/ereuse_devicehub/templates/inventory/snapshots_list.html index 43253d1b..f8a34b23 100644 --- a/ereuse_devicehub/templates/inventory/snapshots_list.html +++ b/ereuse_devicehub/templates/inventory/snapshots_list.html @@ -29,6 +29,7 @@ Snapshot id Version DHID + System UUID Status Time @@ -60,6 +61,9 @@ {% endif %} + + {{ snap.system_uuid }} + {{ snap.status }}