diff --git a/AsbCloudInfrastructure/Services/WellContactService.cs b/AsbCloudInfrastructure/Services/WellContactService.cs index 2fbd9be0..525ce6f9 100644 --- a/AsbCloudInfrastructure/Services/WellContactService.cs +++ b/AsbCloudInfrastructure/Services/WellContactService.cs @@ -93,6 +93,8 @@ namespace AsbCloudInfrastructure.Services public async Task CopyAsync(int idWell, int idWellTarget, IEnumerable contactIds, CancellationToken token) { var dbContacts = await GetContacts(idWell, contactIds, token); + if (!dbContacts.Any()) + throw new ForbidException("contacts not found"); foreach (var dbContact in dbContacts) {