fix rebase with main

This commit is contained in:
Cayo Puigdefabregas 2025-01-31 17:11:51 +01:00
parent e7d958c550
commit 5cf51df952
2 changed files with 29 additions and 15 deletions

View file

@ -294,8 +294,7 @@ class Device:
@property
def version(self):
if not self.last_evidence:
self.get_last_evidence()
self.get_last_evidence()
return self.last_evidence.get_version()
@property

View file

@ -1,19 +1,34 @@
{% load i18n %}
<div class="tab-pane fade" id="evidences">
<div class="tab-pane fade" id="evidences">
<h5 class="card-title">{% trans 'List of evidences' %}</h5>
<div class="list-group col-6">
{% for snap in object.evidences %}
<div class="list-group-item">
<div class="d-flex w-100 justify-content-between">
<small class="text-muted">{{ snap.created }}</small>
</div>
<p class="mb-1">
<a href="{% url 'evidence:details' snap.uuid %}">{{ snap.uuid }}</a>
</p>
</div>
{% endfor %}
<div class="list-group col">
<table class="table">
<thead>
<tr>
<th scope="col">uuid</th>
<th scope="col">Did Document</th>
<th scope="col">{% trans "Date" %}</th>
</tr>
</thead>
<tbody>
{% for snap in object.evidences %}
<tr>
<td>
<a href="{% url 'evidence:details' snap.uuid %}">{{ snap.uuid }}</a>
</td>
<td>
{% if snap.did_document %}
<a href="{{ snap.did_document }}" target="_blank">DID</a>
{% endif %}
</td>
<td>
<small class="text-muted">{{ snap.created }}</small>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>