diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index 081d42c4..89d0bdac 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -1105,9 +1105,9 @@ class ExportsView(View): erasures = sorted(erasures, key=lambda x: x.end_time) erasures_on_server = sorted(erasures_on_server, key=lambda x: x.end_time) - # import pdb; pdb.set_trace() erasures_normal = list(set(erasures) - set(erasures_on_server)) erasures_normal = sorted(erasures_normal, key=lambda x: x.end_time) + n_computers = len({x.parent for x in erasures} - erasures_host) params = { 'title': 'Erasure Certificate', @@ -1117,7 +1117,7 @@ class ExportsView(View): 'uuid_report': '{}'.format(uuid.uuid4()), 'software': software, 'my_data': my_data, - 'n_computers': len(set([x.parent for x in erasures])), + 'n_computers': n_computers, 'result': result, 'customer_details': customer_details, 'erasure_hosts': erasures_host, diff --git a/ereuse_devicehub/templates/inventory/erasure.html b/ereuse_devicehub/templates/inventory/erasure.html index c6b40d12..7b8ae650 100644 --- a/ereuse_devicehub/templates/inventory/erasure.html +++ b/ereuse_devicehub/templates/inventory/erasure.html @@ -159,19 +159,20 @@
- N° of sanitization server ({{ loop.index }}/{{ erasure_hosts|length }}): + N° of sanitization server {{ erasure_hosts|length }}: | + {% for e in erasure_hosts %} {% if e.serial_number %} - {{ e.serial_number.upper() }} + {{ e.serial_number.upper() }}{% if not loop.last %},{% endif %} {% endif %} + {% endfor %} |
N° of computers:
@@ -245,7 +246,7 @@
-
+ |