From ac86de277c26217b265baee8bd308123ea82ae76 Mon Sep 17 00:00:00 2001 From: mbergen Date: Thu, 8 Aug 2024 17:47:42 +0200 Subject: [PATCH 1/2] fix(match2) Prevent matches with default date to be marked as finished --- .../match2/wikis/ageofempires/match_group_input_custom.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/match2/wikis/ageofempires/match_group_input_custom.lua b/components/match2/wikis/ageofempires/match_group_input_custom.lua index a750fbfba2e..b21914d092b 100644 --- a/components/match2/wikis/ageofempires/match_group_input_custom.lua +++ b/components/match2/wikis/ageofempires/match_group_input_custom.lua @@ -6,6 +6,7 @@ -- Please see https://github.com/Liquipedia/Lua-Modules to contribute -- local Array = require('Module:Array') +local DateExt = require('Module:Date/Ext') local Faction = require('Module:Faction') local Game = require('Module:Game') local Json = require('Module:Json') @@ -94,7 +95,7 @@ end ---@param match table function CustomMatchGroupInput._updateFinished(match) match.finished = Logic.nilOr(Logic.readBoolOrNil(match.finished), Logic.isNotEmpty(match.winner)) - if match.finished then + if match.finished or match.timestamp == DateExt.minTimestamp then return end From f1bff0a71a97ac87dece23cd543e5fc487aad4d6 Mon Sep 17 00:00:00 2001 From: mbergen Date: Thu, 8 Aug 2024 17:55:22 +0200 Subject: [PATCH 2/2] Update components/match2/wikis/ageofempires/match_group_input_custom.lua Co-authored-by: Rikard Blixt --- .../match2/wikis/ageofempires/match_group_input_custom.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/match2/wikis/ageofempires/match_group_input_custom.lua b/components/match2/wikis/ageofempires/match_group_input_custom.lua index b21914d092b..7f9909a7dd0 100644 --- a/components/match2/wikis/ageofempires/match_group_input_custom.lua +++ b/components/match2/wikis/ageofempires/match_group_input_custom.lua @@ -95,7 +95,7 @@ end ---@param match table function CustomMatchGroupInput._updateFinished(match) match.finished = Logic.nilOr(Logic.readBoolOrNil(match.finished), Logic.isNotEmpty(match.winner)) - if match.finished or match.timestamp == DateExt.minTimestamp then + if match.finished or match.timestamp == DateExt.defaultTimestamp then return end