This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user