Сообщение об ошибке, если контакты для переноса не найдены

This commit is contained in:
Olga Nemt 2024-07-25 15:46:42 +05:00
parent dad0480f59
commit ac8be4f3db

View File

@ -93,6 +93,8 @@ namespace AsbCloudInfrastructure.Services
public async Task<int> CopyAsync(int idWell, int idWellTarget, IEnumerable<int> contactIds, CancellationToken token)
{
var dbContacts = await GetContacts(idWell, contactIds, token);
if (!dbContacts.Any())
throw new ForbidException("contacts not found");
foreach (var dbContact in dbContacts)
{