Skip to content

Commit 3285829

Browse files
committed
Fixed error in operation_tracker when no response sizes (MongoEngine#45)
1 parent 307426a commit 3285829

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_mongoengine/operation_tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def privar(name):
176176
'time': total_time,
177177
'operation': 'query',
178178
'stack_trace': stack_trace,
179-
'size': response_sizes[-1],
179+
'size': response_sizes[-1] if response_sizes else 0,
180180
'data': copy.copy(privar('data')),
181181
'internal': internal
182182
}

0 commit comments

Comments
 (0)