forked from ddrilling/AsbCloudServer
Сообщение об ошибке, если контакты для переноса не найдены
This commit is contained in:
parent
dad0480f59
commit
ac8be4f3db
@ -93,6 +93,8 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
public async Task<int> CopyAsync(int idWell, int idWellTarget, IEnumerable<int> contactIds, CancellationToken token)
|
public async Task<int> CopyAsync(int idWell, int idWellTarget, IEnumerable<int> contactIds, CancellationToken token)
|
||||||
{
|
{
|
||||||
var dbContacts = await GetContacts(idWell, contactIds, token);
|
var dbContacts = await GetContacts(idWell, contactIds, token);
|
||||||
|
if (!dbContacts.Any())
|
||||||
|
throw new ForbidException("contacts not found");
|
||||||
|
|
||||||
foreach (var dbContact in dbContacts)
|
foreach (var dbContact in dbContacts)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user