Skip to content

Commit 051fcdc

Browse files
src-xgkorland
authored andcommitted
Fix class TagField in client.py (#37)
1 parent a8c11e8 commit 051fcdc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

redisearch/client.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,12 @@ class TagField(Field):
8484
See http://redisearch.io/Tags/
8585
"""
8686
def __init__(self, name, separator = ',', no_index=False):
87-
Field.__init__(self, name, Field.TAG)
88-
if separator != ',':
89-
self.args.append(Field.SEPARATOR)
90-
self.args.append(separator)
87+
args = [Field.TAG, Field.SEPARATOR, separator]
9188

9289
if no_index:
93-
self.args.append(Field.NOINDEX)
90+
args.append(Field.NOINDEX)
91+
92+
Field.__init__(self, name, *args)
9493

9594

9695
class Client(object):
@@ -383,4 +382,4 @@ def aggregate(self, query):
383382
rows = raw[1:]
384383

385384
res = AggregateResult(rows, cursor, schema)
386-
return res
385+
return res

0 commit comments

Comments
 (0)