diff --git a/mongolog/models.py b/mongolog/models.py index 6e02689..91c858e 100644 --- a/mongolog/models.py +++ b/mongolog/models.py @@ -72,7 +72,8 @@ def find(cls, logger=None, query=None, project=None, uuid=None, level=None, limi if limit: aggregate_commands.append({"$limit": limit}) - return db.mongolog.aggregate(aggregate_commands) + results = db.mongolog.aggregate(aggregate_commands) + return results['result'] if isinstance(results, dict) else results class LogRecord(dict):