AppDbContext: Fix NextMgNr() for gaps greater than 1000

This commit is contained in:
2024-03-10 13:06:49 +01:00
parent 61c8d1ee97
commit f242b077bd

View File

@ -183,7 +183,7 @@ namespace Elwig.Helpers {
public async Task<int> NextMgNr() {
int c = 0;
(await Members.OrderBy(m => m.MgNr).Select(m => m.MgNr).ToListAsync())
.ForEach(a => { if (a <= c + 1000) c = a; });
.ForEach(a => { if (a <= c + 10000) c = a; });
return c + 1;
}