From bbd4e59b48a30b9c23f1eb8f8f0066c54d9bb85b Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Thu, 19 Dec 2024 21:33:23 +0100 Subject: [PATCH] [fix] Also try to migrate retail imports that got edited on 4.0 This commit ensures that the internal version of the data is updated to the current WeakAuras internal version if it is either less than 67 or greater than the current WeakAuras internal version. This helps in migrating retail imports that were edited on version 4.0. Changes: - Check if data.internalVersion is less than 67 or greater than WeakAuras.InternalVersion(). - If true, set data.internalVersion to WeakAuras.InternalVersion(). - Perform necessary migrations for triggers and load fields. This ensures compatibility and proper migration of retail imports edited on version 4.0. --- WeakAuras/Modernize.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index e36b8d6..22a00df 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -1195,7 +1195,8 @@ function Private.Modernize(data) end end - if data.internalVersion < 67 then + if data.internalVersion < 67 or data.internalVersion > WeakAuras.InternalVersion() then + data.internalVersion = WeakAuras.InternalVersion() local function migrateToTable(tab, field) local value = tab[field] if value ~= nil and type(value) ~= "table" then