[fix:] default module config was wrong
This commit is contained in:
@@ -99,8 +99,7 @@ public static class SchemaMigration
|
|||||||
// Example: Add a new field that didn't exist before
|
// Example: Add a new field that didn't exist before
|
||||||
if (!obj.ContainsKey("moduleConfig"))
|
if (!obj.ContainsKey("moduleConfig"))
|
||||||
{
|
{
|
||||||
string deflt = JsonConvert.SerializeObject(new ModuleConfig());
|
obj["moduleConfig"] = JToken.FromObject(new ModuleConfig());
|
||||||
obj["moduleConfig"] = default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class Settings
|
|||||||
public Customers customers = new();
|
public Customers customers = new();
|
||||||
public PdfExportSettings pdfExport { get; set; } = new();
|
public PdfExportSettings pdfExport { get; set; } = new();
|
||||||
|
|
||||||
public ModuleConfig moduleConfig { get; set; } = new();
|
public ModuleConfig moduleConfig { get; set; } = new ModuleConfig();
|
||||||
|
|
||||||
public Settings()
|
public Settings()
|
||||||
{
|
{
|
||||||
@@ -79,6 +79,10 @@ public class ModuleConfig
|
|||||||
/// Contains enabled modules and whether it's password-protected or not (non-existing-feature but soon)
|
/// Contains enabled modules and whether it's password-protected or not (non-existing-feature but soon)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<(LCModule, bool)> EnabledModules = new();
|
public List<(LCModule, bool)> EnabledModules = new();
|
||||||
|
public ModuleConfig()
|
||||||
|
{
|
||||||
|
EnabledModules = new List<(LCModule,bool)>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum LCModule
|
public enum LCModule
|
||||||
|
|||||||
Reference in New Issue
Block a user