Skip to content

Commit a5eba56

Browse files
committed
Use the new query method in PullDataFunctionHandler
1 parent b2d2588 commit a5eba56

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

entities/src/main/java/org/odk/collect/entities/javarosa/filter/PullDataFunctionHandler.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class PullDataFunctionHandler(
3737
val filterChild = XPathFuncExpr.toString(args[2])
3838
val filterValue = XPathFuncExpr.toString(args[3])
3939

40-
instanceAdapter.queryEq(instanceId, filterChild, filterValue).firstOrNull()
40+
val selection = "$filterChild = ?"
41+
val selectionArgs = arrayOf(filterValue)
42+
instanceAdapter.query(instanceId, selection, selectionArgs).firstOrNull()
4143
?.getFirstChild(child)?.value?.value ?: ""
4244
} else {
4345
fallback?.eval(args, ec) ?: ""

0 commit comments

Comments
 (0)