We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 12a9336 + 00a1b16 commit e144dcbCopy full SHA for e144dcb
1 file changed
src/main/java/com/hubspot/jinjava/lib/filter/SelectAttrFilter.java
@@ -111,15 +111,16 @@ protected Object applyFilter(
111
}
112
113
ForLoop loop = ObjectIterator.getLoop(var);
114
+ Variable tempVariable = new Variable(
115
+ interpreter,
116
+ String.format("%s.%s", "placeholder", attr)
117
+ );
118
while (loop.hasNext()) {
119
Object val = loop.next();
120
- Object attrVal = new Variable(
- interpreter,
- String.format("%s.%s", "placeholder", attr)
- )
121
- .resolve(val);
122
- if (acceptObjects == expTest.evaluate(attrVal, interpreter, expArgs)) {
+ if (
+ acceptObjects == expTest.evaluate(tempVariable.resolve(val), interpreter, expArgs)
123
+ ) {
124
result.add(val);
125
126
0 commit comments