From f0d1b59fac2673ae4946169ed9ff760b3ab805f8 Mon Sep 17 00:00:00 2001 From: mbergen Date: Fri, 3 Nov 2023 23:28:44 +0100 Subject: [PATCH] EML: Fill event-link from resolved event (#3473) * EML: Fill event-link from resolved event * Use Logic.emptyOr Co-authored-by: Martin B --------- Co-authored-by: Martin B --- components/external_media_links/external_media_link.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/external_media_links/external_media_link.lua b/components/external_media_links/external_media_link.lua index e6e5a561d5b..eac40f2c25f 100644 --- a/components/external_media_links/external_media_link.lua +++ b/components/external_media_links/external_media_link.lua @@ -87,7 +87,9 @@ function ExternalMediaLink._store(args) translation = args.translation, translator = args.translator, event = args.event, - event_link = args['event-link'], + event_link = mw.ext.TeamLiquidIntegration.resolve_redirect( + Logic.emptyOr(args['event-link'], args.event, '') + ), subject_organization = args.subject_organization1, --legacy } @@ -245,7 +247,7 @@ function ExternalMediaLink.wrapper(args) type = args.type and args.type:lower() or nil, of = args.of, event = args.event, - ['event-link'] = args['event-link'] and mw.ext.TeamLiquidIntegration.resolve_redirect(args['event-link']) or nil, + ['event-link'] = args['event-link'], language = args.language, translation = args.translation, translator = args.translator,