Update moto/dynamodb2/models.py

Co-Authored-By: pvbouwel <petervanbouwel@gmail.com>
This commit is contained in:
Bert Blommers 2020-04-14 07:48:20 +01:00 committed by GitHub
parent 1e1fe3ee4b
commit 8122a40be0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1127,7 +1127,7 @@ class Table(BaseModel):
last_evaluated_key = None last_evaluated_key = None
size_limit = 1000000 # DynamoDB has a 1MB size limit size_limit = 1000000 # DynamoDB has a 1MB size limit
item_size = sum([res.size() for res in results]) item_size = sum(res.size() for res in results)
if item_size > size_limit: if item_size > size_limit:
item_size = idx = 0 item_size = idx = 0
while item_size + results[idx].size() < size_limit: while item_size + results[idx].size() < size_limit: