Skip to content

Commit 6eef9c4

Browse files
committed
Fixing support for new schema type (dict)
1 parent 407370a commit 6eef9c4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tarantool/schema.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ def __init__(self, index_row, space):
2626
self.unique = index_row[4]
2727
self.parts = []
2828
if isinstance(index_row[5], (list, tuple)):
29-
for k, v in index_row[5]:
30-
self.parts.append((k, v))
29+
for val in index_row[5]:
30+
if isinstance(val, dict):
31+
self.parts.append((val['field'], val['type']))
32+
else:
33+
self.parts.append((val[0], val[1]))
3134
else:
3235
for i in range(index_row[5]):
3336
self.parts.append((

0 commit comments

Comments
 (0)