Skip to content

Commit

Permalink
fix error when no recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Sep 9, 2024
1 parent f96058e commit 61933e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sherlog-cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ static async Task<int> Main(string[] args)
return -1;
}

if (recipients.Count == 0)
{
Console.WriteLine("No recipients found for tenant. Please set up in NetBox first.");
return -1;
}

Console.Write("\n");
var selectedRecipients = Prompt.MultiSelect("Select stakeholders to be notified on this log entry?", recipients, pageSize: 3).ToList();

Expand Down

0 comments on commit 61933e0

Please sign in to comment.