fix: Update v2 config detection criteria

Changed the logic for identifying v2 configuration files. The check now looks for the presence of a "versions" node instead of the absence of "system" or "template" nodes, reflecting an update in the configuration file structure.
This commit is contained in:
Neil Dorin
2025-09-22 15:05:06 -06:00
parent ff46fb8f29
commit 9de94bd65f

View File

@@ -129,10 +129,10 @@ namespace PepperDash.Essentials.Core.Config
{
var parsedConfig = JObject.Parse(fs.ReadToEnd());
// Check if it's a v2 config (missing "system" or "template" nodes)
// Check if it's a v2 config (check for "version" node)
// this means it's already merged by the Portal API
// from the v2 config tool
var isV2Config = parsedConfig["system"] == null || parsedConfig["template"] == null;
var isV2Config = parsedConfig["versions"] != null;
if (isV2Config)
{