Skip to content

Commit

Permalink
Fix KeyError bug in format_index function
Browse files Browse the repository at this point in the history
joowani committed Oct 8, 2019
1 parent a9a465a commit d596368
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 4 additions & 2 deletions arango/formatter.py
Original file line number Diff line number Diff line change
@@ -12,10 +12,12 @@ def format_index(body): # pragma: no cover
"""
result = {
'id': body['id'].split('/', 1)[-1],
'name': body['name'],
'type': body['type'],
'fields': body['fields']
}
if 'type' in body:
result['type'] = body['type']
if 'name' in body:
result['name'] = body['name']
if 'deduplicate' in body:
result['deduplicate'] = body['deduplicate']
if 'sparse' in body:
2 changes: 1 addition & 1 deletion arango/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '5.2.0'
__version__ = '5.2.1'
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[bdist_wheel]
universal = 1

[coverage:run]
omit = arango/collection.py

0 comments on commit d596368

Please sign in to comment.