bugfix integration with dpp/dlt #50

Merged
pedro merged 12 commits from fix_build into main 2025-02-14 13:36:40 +00:00
2 changed files with 8 additions and 4 deletions
Showing only changes of commit 28479fb871 - Show all commits

View file

@ -6,11 +6,11 @@
{% for d in dpps %} {% for d in dpps %}
<div class="list-group-item"> <div class="list-group-item">
<div class="d-flex w-100 justify-content-between"> <div class="d-flex w-100 justify-content-between">
<small class="text-muted">{{ d.timestamp }}</small> <small class="text-muted">{{ d.2.timestamp }}</small>
<span>{{ d.type }}</span> <span>{{ d.2.type }}</span>
</div> </div>
<p class="mb-1"> <p class="mb-1">
<a href="{% url 'did:device_web' d.signature %}">{{ d.signature }}</a> <a href="{% url 'did:device_web' d.0 %}">{{ d.1 }}...</a>
</p> </p>
</div> </div>
{% endfor %} {% endfor %}

View file

@ -94,10 +94,14 @@ class DetailsView(DashboardView, TemplateView):
lot_tags = LotTag.objects.filter(owner=self.request.user.institution) lot_tags = LotTag.objects.filter(owner=self.request.user.institution)
dpps = [] dpps = []
if settings.DPP: if settings.DPP:
dpps = Proof.objects.filter( _dpps = Proof.objects.filter(
uuid__in=self.object.uuids, uuid__in=self.object.uuids,
type=PROOF_TYPE["IssueDPP"] type=PROOF_TYPE["IssueDPP"]
) )
for x in _dpps:
dpp = "{}:{}".format(self.pk, x.signature)
dpps.append((dpp, x.signature[:10], x))
last_evidence = self.object.get_last_evidence() last_evidence = self.object.get_last_evidence()
uuids = self.object.uuids uuids = self.object.uuids
state_definitions = StateDefinition.objects.filter( state_definitions = StateDefinition.objects.filter(