This commit is contained in:
@@ -21,11 +21,11 @@ namespace AyaNova.Util
|
||||
internal static void Initialize(AyContext ct = null)
|
||||
{
|
||||
//fetch or create as not provided (meaning this was called from Startup.cs)
|
||||
Backup = ct.GlobalOpsSettings.FirstOrDefault(z => z.Id == 1);
|
||||
Backup = ct.GlobalOpsBackupSettings.FirstOrDefault(z => z.Id == 1);
|
||||
if (Backup == null)
|
||||
{
|
||||
Backup = new GlobalOpsBackupSettings();
|
||||
ct.GlobalOpsSettings.Add(Backup);
|
||||
ct.GlobalOpsBackupSettings.Add(Backup);
|
||||
ct.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user