Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Commit dffa938

Browse files
authored
fix(pymongo): handle response collection error (#398)
* fix(pymongo): handle response collection error * fix(pymongo): pytest version for 3.7
1 parent 358b092 commit dffa938

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

epsagon/events/pymongo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def handle_filter_operations_response(self, response):
125125

126126
if self.resource['operation'] == 'find':
127127
self.resource['metadata']['Results'] = \
128-
list(response)
128+
[response[i] for i in range(response.count())]
129129

130130
elif self.resource['operation'] == 'update_one':
131131
self.resource['metadata']['matched_count'] = \

requirements-dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Flask
77
pylint>=1.9.5,<=2.5.3
88
pylint-quotes
99
django
10-
pytest==6.2.5; python_version >= '3.7'
10+
pytest==6.2.5; python_version > '3.7'
11+
pytest==6.1.0; python_version == '3.7'
1112
pytest==6.0.0; python_version >= '3.5' and python_version < '3.7'
1213
pytest==4.6.0; python_version < '3.5'
1314
requests

0 commit comments

Comments
 (0)