[fix:] now, they get unique id's when importing

This commit is contained in:
2026-03-19 14:20:59 +01:00
parent afbb4626a0
commit e8738a2eab

View File

@@ -169,13 +169,19 @@ public class KasPerson
public static int GenerateNewID(int base_id)
{
var newid = 100000 + base_id;
//var newid = 100000 + base_id;
int highest = 0;
foreach (var set in Settings._instance.addressSets.addresses)
{
foreach (var add in set.KasPersons)
if (add.id >= newid)
newid = add.id + 1;
{
if(add.id >= highest) highest = add.id+1;
}
return newid;
}
return highest + base_id + 1;
}
}