Skip to content

Commit b2e83eb

Browse files
committed
fix an issue where query_id, when the queryClause is null
1 parent 8ee7888 commit b2e83eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/picoded/dstack/mongodb/MongoDB_DataObjectMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public String[] query_id(Query queryClause, String orderByStr, int offset, int l
436436
search = collection.find(bsonFilter);
437437
} else if (sec_mode.equals("LIKE")) {
438438
// Use secondary connection for LIKE query
439-
if (queryClause.toSqlString().toUpperCase().indexOf("LIKE") > 0) {
439+
if (queryClause == null || queryClause.toSqlString().toUpperCase().indexOf("LIKE") > 0) {
440440
search = sec_collection.find(bsonFilter);
441441
}
442442
} else if (sec_mode.equals("QUERY")) {

0 commit comments

Comments
 (0)