Merge pull request #1675 from william-richard/dynamodb-index-query-bug-fix

Make dynamodb table indexes a list
This commit is contained in:
Steve Pulec 2018-06-08 18:46:41 -04:00 committed by GitHub
commit 0dfe55fde9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 99 additions and 5 deletions

View file

@ -706,7 +706,9 @@ class DynamoDBBackend(BaseBackend):
gsis_by_name[gsi_to_create['IndexName']] = gsi_to_create
table.global_indexes = gsis_by_name.values()
# in python 3.6, dict.values() returns a dict_values object, but we expect it to be a list in other
# parts of the codebase
table.global_indexes = list(gsis_by_name.values())
return table
def put_item(self, table_name, item_attrs, expected=None, overwrite=False):