From 7b870b76ecb525650862392a2d345dfea2cd9783 Mon Sep 17 00:00:00 2001 From: Maciej Pienczyn Date: Sun, 11 Jan 2026 15:08:22 +0100 Subject: [PATCH] fix: Count unique companies not roles in person profile subtitle "Powiazany z 6 firmami (9 rol)" instead of "Powiazany z 9 firmami" Co-Authored-By: Claude Opus 4.5 --- templates/person_detail.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/person_detail.html b/templates/person_detail.html index f0764a3..42858bf 100644 --- a/templates/person_detail.html +++ b/templates/person_detail.html @@ -190,8 +190,9 @@ {{ person.imiona[0] }}{{ person.nazwisko[0] }}

{{ person.full_name() }}

+ {% set unique_company_ids = company_roles|map(attribute='company_id')|list|unique|list %}

- Powiazany z {{ company_roles|length }} firmami w Norda Biznes + Powiazany z {{ unique_company_ids|length }} firmami ({{ company_roles|length }} ról) w Norda Biznes