This commit is contained in:
@@ -13,8 +13,6 @@ using AyaNova.Biz;
|
||||
using AyaNova.Util;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using EnumsNET;
|
||||
using AyaNova.DataList;
|
||||
|
||||
namespace AyaNova.Api.Controllers
|
||||
{
|
||||
|
||||
@@ -341,6 +341,11 @@ namespace AyaNova.Biz
|
||||
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
||||
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
||||
|
||||
if (selectedRequest.ObjectType == AyaType.NoType)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, null, $"ObjectType is required");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, selectedRequest.ObjectType))
|
||||
{
|
||||
@@ -399,7 +404,11 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
//Get data
|
||||
var ReportData = await GetReportData(reportRequest);
|
||||
var ReportData = await GetReportData(reportRequest);
|
||||
//if GetReportData errored then will return null so need to return that as well here
|
||||
if(ReportData==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
//initialization
|
||||
log.LogDebug("Initializing report system");
|
||||
|
||||
Reference in New Issue
Block a user