AppDbContext: Fix NextMgNr() for gaps greater than 1000
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user