fixed save new person with partner list

This commit is contained in:
2026-03-26 23:03:08 +11:00
parent ef6f4152cc
commit 40515d0e3a
2 changed files with 24 additions and 14 deletions
@@ -560,6 +560,14 @@ public partial class PersonRepository : IPerson
_context.Persons.Add(model);
var successid = await _context.SaveChangesAsync();
result = model.Id;
if (item.RelationShips != null)
{
for (int m = 0; m < item.RelationShips.Count; m++)
{
item.RelationShips[m].PersonId = result;
}
}
if (!string.IsNullOrEmpty(container.FileName))
{