Query sort keying on index values and not index hashes which was causing unexpected ording results
This commit is contained in:
parent
372e2d8729
commit
76856aadc7
2 changed files with 16 additions and 3 deletions
|
|
@ -238,12 +238,11 @@ class DynamoHandler(BaseResponse):
|
|||
if items is None:
|
||||
er = 'com.amazonaws.dynamodb.v20111205#ResourceNotFoundException'
|
||||
return self.error(er)
|
||||
|
||||
items.sort(key=lambda item: item.range_key)
|
||||
|
||||
limit = self.body.get("Limit")
|
||||
if limit:
|
||||
items = items[:limit]
|
||||
|
||||
|
||||
result = {
|
||||
"Count": len(items),
|
||||
"Items": [item.attrs for item in items],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue