Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #78 from tumb1er/escape_fields
Browse files Browse the repository at this point in the history
fixes #76
  • Loading branch information
tumb1er committed Apr 12, 2016
2 parents 6ab746a + b299eb1 commit 633c750
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions alco/collector/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ def load_index_columns(self):
@staticmethod
def process_js_columns(js, columns, included, seen):
for key, value in list(js.items()):
if key in ('pk', 'id', 'ts', 'ms', 'seq'):
# reserved by Django and ALCO
js.pop(key)
continue
if key in ('pk', 'id', 'ts', 'ms', 'seq', 'model'):
# escape fields reserved by Django and ALCO
js['%s_x' % key] = js.pop(key)
key = '%s_x' % key
# save seen columns set
if key not in seen:
seen.add(key)
Expand Down
2 changes: 0 additions & 2 deletions alco/grep/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ class Meta:
fields = {}

for column in index.loggercolumn_set.all():
if column.name in ('pk', 'id'):
continue
if column.indexed:
fields[column.name] = create_sphinx_field(column.name)
else:
Expand Down

0 comments on commit 633c750

Please sign in to comment.