mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
properly capture the currentDescriptorByNameUrl (when <l:renderOnDemand> is nested twice)
This commit is contained in:
1 parent
3eb1a16f64
commit
f9f4c417c6
1 file changed
+2
-4
@@ -24,6 +24,7 @@
|
||||
package hudson.widgets;
|
||||
|
||||
import hudson.Util;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.DescriptorByNameOwner;
|
||||
import hudson.util.IOException2;
|
||||
import hudson.util.PackedMap;
|
||||
@@ -74,10 +75,7 @@ public class RenderOnDemandClosure {
|
||||
variables.put(v,context.getVariable(v));
|
||||
|
||||
// capture the current base of context for descriptors
|
||||
StaplerRequest req = Stapler.getCurrentRequest();
|
||||
Ancestor a = req.findAncestor(DescriptorByNameOwner.class);
|
||||
currentDescriptorByNameUrl = a.getUrl();
|
||||
|
||||
currentDescriptorByNameUrl = Descriptor.getCurrentDescriptorByNameUrl();
|
||||
|
||||
this.variables = PackedMap.of(variables);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user