Skip to content

Commit

Permalink
Verify ReportId (#740)
Browse files Browse the repository at this point in the history
avoid NPE for bad values
  • Loading branch information
labkey-matthewb authored Mar 21, 2024
1 parent 947e012 commit 99a90c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flow/src/org/labkey/flow/reports/FlowReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ protected void updateBaseProperties(ContainerUser cu, PropertyValues pvs, BindEx
@Override
public ActionURL getRunReportURL(ViewContext context)
{
if (null == getReportId())
return null;
Container c = ContainerManager.getForId(getDescriptor().getContainerId());
ActionURL url = new ActionURL(ReportsController.ExecuteAction.class, c);
url.addParameter("reportId", getReportId().toString());
Expand All @@ -129,6 +131,8 @@ public ActionURL getRunReportURL(ViewContext context)
@Override
public ActionURL getEditReportURL(ViewContext context)
{
if (null == getReportId())
return null;
Container c = ContainerManager.getForId(getDescriptor().getContainerId());
ActionURL url = new ActionURL(ReportsController.UpdateAction.class, c);
url.addParameter("reportId", getReportId().toString());
Expand Down

0 comments on commit 99a90c3

Please sign in to comment.