fix(calendar): use external_source as organizer for external events
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
ICS export, RSS feed, and admin creation now correctly use external_source (e.g. "Agencja Rozwoju Pomorza") as the organizer instead of defaulting to "Norda Biznes" for external events. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fe304e895f
commit
bcc33fecc9
@ -960,6 +960,7 @@ def admin_calendar_new():
|
||||
is_external=is_external,
|
||||
external_url=request.form.get('external_url', '').strip() or None if is_external else None,
|
||||
external_source=request.form.get('external_source', '').strip() or None if is_external else None,
|
||||
organizer_name=request.form.get('external_source', '').strip() or 'Norda Biznes' if is_external else 'Norda Biznes',
|
||||
)
|
||||
|
||||
# Handle file attachment
|
||||
|
||||
@ -99,7 +99,7 @@ def feed_events():
|
||||
'title': e.title,
|
||||
'link': f'{SITE_URL}/kalendarz/{e.id}',
|
||||
'thumbnail': _full_url(e.image_url),
|
||||
'creator': e.organizer_name or ORG_NAME,
|
||||
'creator': e.external_source or e.organizer_name or ORG_NAME,
|
||||
'content': e.description or '',
|
||||
'datawydarzenia': _kig_date(e.event_date),
|
||||
'pub_date': e.created_at or e.event_date,
|
||||
|
||||
@ -704,7 +704,7 @@ const _evt = {
|
||||
location: {{ (event.location or '')|tojson }},
|
||||
speaker: {{ (event.speaker_name or '')|tojson }},
|
||||
description: {{ (event.description or '')|tojson }},
|
||||
organizerName: {{ (event.organizer_name or 'Norda Biznes')|tojson }},
|
||||
organizerName: {{ (event.external_source if event.is_external and event.external_source else event.organizer_name or 'Norda Biznes')|tojson }},
|
||||
organizerEmail: {{ (event.organizer_email or 'biuro@norda-biznes.info')|tojson }},
|
||||
url: window.location.href,
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user