Fix Task 6: Device FK to AspNetUsers + SystemSettings singleton Id pin

This commit is contained in:
2026-06-11 18:46:42 +00:00
parent 68e7e81312
commit 3e9c245bb3
5 changed files with 445 additions and 4 deletions
+2 -2
View File
@@ -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();
}
}