Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mahartov authored and mahartov committed May 22, 2018
1 parent f4560b0 commit 6df7fba
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,13 @@ protected void GetReport()
// Gets a report from the group.
report = GetReportFromGroup(client, groupId, reportId);
}

// Settings contains report ID. (no group ID)
// Settings' report and group Ids are empty, retrieves the user's first report.
else if (string.IsNullOrEmpty(reportId))
{
report = client.Reports.GetReports().Value.FirstOrDefault();
AppendErrorIfReportNull(report, "No reports found. Please specify the target report ID and group in the applications settings.");
}

// Settings' report and group Ids are empty, retrieves the user's first report.
// Settings contains report ID. (no group ID)
else
{
report = client.Reports.GetReports().Value.FirstOrDefault(r => r.Id == reportId);
Expand Down

0 comments on commit 6df7fba

Please sign in to comment.