Skip to content

Commit bd6dd67

Browse files
committed
Code review feedback
1 parent 6fe6bad commit bd6dd67

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

flow/src/org/labkey/flow/controllers/editscript/EditScriptForm.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
package org.labkey.flow.controllers.editscript;
1818

19-
import org.apache.logging.log4j.Logger;
2019
import org.apache.logging.log4j.LogManager;
20+
import org.apache.logging.log4j.Logger;
2121
import org.fhcrc.cpas.flow.script.xml.ScriptDocument;
2222
import org.jetbrains.annotations.NotNull;
2323
import org.labkey.api.security.permissions.UpdatePermission;
@@ -73,12 +73,7 @@ public void reset()
7373
{
7474
try
7575
{
76-
ActionURL url = getViewContext().getActionURL();
77-
// Read scriptId from the action URL (falling back to the request parameter) so it resolves under both
78-
// real browser requests and in-JVM mock dispatch, mirroring how runId/compId below are read from the URL.
79-
String scriptIdStr = url.getParameter("scriptId");
80-
if (scriptIdStr == null)
81-
scriptIdStr = getRequest().getParameter("scriptId");
76+
String scriptIdStr = getRequest().getParameter("scriptId");
8277
if (scriptIdStr == null)
8378
{
8479
throw new NotFoundException("scriptId required");
@@ -98,7 +93,7 @@ public void reset()
9893
throw new NotFoundException("scriptId not found: " + scriptIdStr);
9994
}
10095
// GitHub Issue #1892: validate container
101-
flowObject.checkContainer(getContainer(), getUser(), url);
96+
flowObject.checkContainer(getContainer(), getUser(), getViewContext().getActionURL());
10297
_runCount = flowObject.getRunCount();
10398
step = FlowProtocolStep.fromRequest(getRequest());
10499
_run = FlowRun.fromURL(getViewContext().getActionURL(), getRequest(), getViewContext().getContainer(), getUser());

0 commit comments

Comments
 (0)