Skip to content

Commit 4777d22

Browse files
committed
Prevent NullPointerException when using sum(attribute)
1 parent 03a4bf5 commit 4777d22

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/com/hubspot/jinjava/lib/filter/SumFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public Object filter(
7777

7878
if (attr != null) {
7979
val = interpreter.resolveProperty(val, attr);
80+
if (val == null) {
81+
continue;
82+
}
8083
}
8184

8285
try {

0 commit comments

Comments
 (0)