Deagregation processor fix

This commit is contained in:
Michał Zieliński
2023-10-11 12:52:17 +02:00
parent 23ef41089f
commit 31436101be
2 changed files with 16 additions and 6 deletions

View File

@@ -405,6 +405,11 @@ namespace WebAPI.Controllers
{
try
{
List<Record> toDelete = db.Records.Where(x => x.LayerId == id).ToList();
if (toDelete.Count > 0)
{
db.Records.RemoveRange(toDelete);
}
foreach (Record record in records)
{
record.CreatedById = currentUserId;