Skip to content

Commit babc83f

Browse files
committed
Always return zero in dataset count query if no results
1 parent d01522f commit babc83f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

federated-catalog/src/main/java/org/eclipse/edc/heleade/federated/catalog/extension/store/mongodb/cache/MongodbFederatedCatalogCache.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ private String countInternalDatasets(MongoClient connection, QuerySpec querySpec
249249
}
250250

251251
var document = documents.first();
252-
String result = document == null ? "{}" : document.toJson();
252+
String result = document == null ? "{\"count\": 0}" : document.toJson();
253+
253254
return result;
254255
}
255256

0 commit comments

Comments
 (0)