fix(board): Handle NULL proceedings/agenda_items in meeting view
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
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
Meeting JSONB fields (proceedings, agenda_items) can be NULL for meetings that haven't occurred yet. Add `or []` fallback to all unguarded Jinja2 iterations to prevent TypeError on NoneType. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
09ef2b62a5
commit
d855f36cc0
@ -637,7 +637,7 @@
|
||||
Przebieg posiedzenia i ustalenia
|
||||
</h2>
|
||||
|
||||
{% for proc in meeting.proceedings %}
|
||||
{% for proc in meeting.proceedings or [] %}
|
||||
{% set agenda_item = meeting.agenda_items[proc.agenda_item] if meeting.agenda_items and proc.agenda_item < meeting.agenda_items|length else none %}
|
||||
<div class="proceeding-item">
|
||||
<h3>Ad. {{ proc.agenda_item + 1 }}. {{ agenda_item.title if agenda_item else 'Punkt programu' }}</h3>
|
||||
@ -667,7 +667,7 @@ function printAgenda() {
|
||||
|
||||
// Collect agenda items
|
||||
const agendaItems = [
|
||||
{% for item in meeting.agenda_items %}
|
||||
{% for item in meeting.agenda_items or [] %}
|
||||
{ time: '{{ item.time_start }}{% if item.time_end %} - {{ item.time_end }}{% endif %}', title: '{{ item.title|e }}' },
|
||||
{% endfor %}
|
||||
];
|
||||
@ -738,14 +738,14 @@ function printProtocol() {
|
||||
|
||||
// Collect agenda items
|
||||
const agendaItems = [
|
||||
{% for item in meeting.agenda_items %}
|
||||
{% for item in meeting.agenda_items or [] %}
|
||||
'{{ item.title|e }}',
|
||||
{% endfor %}
|
||||
];
|
||||
|
||||
// Collect proceedings
|
||||
const proceedings = [
|
||||
{% for proc in meeting.proceedings %}
|
||||
{% for proc in meeting.proceedings or [] %}
|
||||
{ index: {{ proc.agenda_item }}, discussed: `{{ proc.discussed|e|replace('\n', '\\n') }}`, decisions: `{{ proc.decisions|e|replace('\n', '\\n') }}` },
|
||||
{% endfor %}
|
||||
];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user