Permalink
Browse files

PYCBC-347: `fields` is not comma-delimited, but a list

Change-Id: I8d8a453837eea70e85a0491ced0327a00d7a6ff6
Reviewed-on: http://review.couchbase.org/65074
Tested-by: Mark Nunberg <mark.nunberg@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
  • Loading branch information...
1 parent a4e5108 commit 2dc82f7987776bdd062ce2ce8ab0023ea66eea4a @mnunberg mnunberg committed with mnunberg Jun 20, 2016
Showing with 2 additions and 7 deletions.
  1. +1 −6 couchbase/_ixmgmt.py
  2. +1 −1 couchbase/bucketmanager.py
View
7 couchbase/_ixmgmt.py
@@ -53,12 +53,7 @@ def __init__(self, raw=None):
keyspace = _genprop('keyspace_id') # type: str
state = _genprop('state') # type: str
condition = _genprop('condition') # type: str
- _index_key = _genprop('index_key') # type: str
-
- @property
- def fields(self):
- if self._index_key:
- return self._index_key.split(',')
+ fields = _genprop('index_key') # type: list[str]
def __repr__(self):
return ('Index<name={0.name}, primary={0.primary}, raw={0.raw!r}>'
View
2 couchbase/bucketmanager.py
@@ -339,7 +339,7 @@ def n1ql_index_create(self, ix, **kwargs):
raise ValueError('Fields required for non-primary index')
if fields:
- info._index_key = ','.join(fields)
+ info.fields = fields
if primary and info.name is N1QL_PRIMARY_INDEX:
del info.name

0 comments on commit 2dc82f7

Please sign in to comment.