This commit is contained in:
2021-03-10 21:49:09 +00:00
parent 715e35445b
commit 73ba204dc3
4 changed files with 24 additions and 27 deletions

View File

@@ -138,18 +138,7 @@ namespace AyaNova.Biz
else
AddError(ApiErrorCode.CONCURRENCY_CONFLICT);
return null;
}
catch (Microsoft.EntityFrameworkCore.DbUpdateException ex)
{
if (ex.InnerException != null && ex.InnerException.Message.Contains("unq_unitmodelnumbervendorid"))
{
AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "number", "Model number plus VendorId combination must be unique");
return null;
}
throw;
}
}
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, dbObject.Id, BizType, AyaEvent.Modified), ct);
await SearchIndexAsync(putObject, false);
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, putObject.Tags, dbObject.Tags);