diff --git a/kairon/shared/data/processor.py b/kairon/shared/data/processor.py index 7ebc0af64..fb49fd4c7 100644 --- a/kairon/shared/data/processor.py +++ b/kairon/shared/data/processor.py @@ -3591,7 +3591,13 @@ def get_row_count(document: Document, bot: str, **kwargs): query = {"bot": bot} if document.__name__ == "AuditLogData": query = { - "attributes__key": bot} + "attributes": { + "$elemMatch": { + "key": 'bot', + "value": bot + } + } + } kwargs.update(__raw__=query) return document.objects(**kwargs).count()