Fix Task 6: Device FK to AspNetUsers + SystemSettings singleton Id pin
This commit is contained in:
+2
-2
@@ -19,9 +19,9 @@ using (var scope = app.Services.CreateScope())
|
||||
db.Database.Migrate();
|
||||
await IdentitySetup.SeedRolesAsync(sp);
|
||||
|
||||
if (!db.SystemSettings.Any())
|
||||
if (db.SystemSettings.Find(1) is null)
|
||||
{
|
||||
db.SystemSettings.Add(new backend.Settings.SystemSettings());
|
||||
db.SystemSettings.Add(new backend.Settings.SystemSettings { Id = 1 });
|
||||
await db.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user