DeliveryService: Do not delete own delivery in SplitDeliveryToLsNr()
All checks were successful
Test / Run tests (push) Successful in 2m8s

This commit is contained in:
2024-09-29 22:12:19 +02:00
parent a2315e84bd
commit c185437b9a

View File

@ -614,7 +614,7 @@ namespace Elwig.Services {
}
await ctx.SaveChangesAsync();
if (!anyLeft)
if (!anyLeft && n.LsNr != d.LsNr)
await ctx.Database.ExecuteSqlAsync($"DELETE FROM delivery WHERE (year, did) = ({d.Year}, {d.DId})");
}