This commit is contained in:
2020-07-22 15:30:56 +00:00
parent f9f55c95d7
commit edd58cb380
4 changed files with 34 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ namespace AyaNova.Util
internal static bool BOOTING { get; set; }
internal static GlobalOpsBackupSettings Backup { get; set; }
internal static GlobalOpsNotificationSettings Notify {get;set;}
internal static GlobalOpsNotificationSettings Notify { get; set; }
internal static DateTime NextBackup { get; set; }
/// <summary>
/// Populate and / or create the settings
@@ -35,10 +35,12 @@ namespace AyaNova.Util
SetNextBackup();
Notify=ct.GlobalOpsNotificationSettings.FirstOrDefault(z=>z.Id==1);
if(Notify==null)
Notify = ct.GlobalOpsNotificationSettings.FirstOrDefault(z => z.Id == 1);
if (Notify == null)
{
Notify=new GlobalOpsNotificationSettings();
Notify = new GlobalOpsNotificationSettings();
ct.GlobalOpsNotificationSettings.Add(Notify);
ct.SaveChanges();
}
}