Fix a bug that was making it impossible to display billing information in the android app.

This commit is contained in:
MarkBryanMilligan
2022-04-04 17:20:15 -05:00
parent 8387216c44
commit d30fc4b4ce
11 changed files with 52 additions and 24 deletions

View File

@@ -379,7 +379,10 @@ public class MongoProxy extends AbstractDaoProxy {
@Override
public int count(String _tableName, DaoQuery _query) {
return (int) db().getCollection(_tableName).count(prepareQuery(_query));
if (CollectionUtils.isEmpty(_query))
return (int) db().getCollection(_tableName).countDocuments();
else
return (int) db().getCollection(_tableName).countDocuments(prepareQuery(_query));
}
public void ensureIndex(Class<?> _class, DaoSort _indexOrder) {