fix(social-audit): replace Jinja2 'search' test with 'in' operator
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Jinja2 has no 'search' test. Use namespace loop with 'in' string check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-12 08:00:39 +01:00
parent c5a7831792
commit 4cbb2df7ae

View File

@ -812,10 +812,11 @@
</td>
<td class="hide-mobile" style="font-size: 11px; white-space: nowrap;">
{% if company.recommendations %}
{% set critical = company.recommendations|select('search', 'Brak profili')|list|length %}
{% set warnings = company.recommendations|length - critical %}
{% set ns = namespace(critical=0) %}
{% for rec in company.recommendations %}{% if 'Brak profili' in rec %}{% set ns.critical = ns.critical + 1 %}{% endif %}{% endfor %}
{% set warnings = company.recommendations|length - ns.critical %}
<span title="{{ company.recommendations|join(', ') }}" style="cursor: help;">
{% if critical %}<span style="color: #991b1b;">&#10060; {{ critical }}</span> {% endif %}
{% if ns.critical %}<span style="color: #991b1b;">&#10060; {{ ns.critical }}</span> {% endif %}
{% if warnings %}<span style="color: #b45309;">&#9888; {{ warnings }}</span>{% endif %}
</span>
{% else %}