mirror of
https://github.com/zyphlar/LanternPowerMonitor.git
synced 2024-03-08 14:07:47 +00:00
Fix a bug that was making it impossible to display billing information in the android app.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user