Skip to content

Commit

Permalink
Fix update_index parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Jul 18, 2018
1 parent 6c1fe97 commit a62d1f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kinto_algolia/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def on_collection_updated(event):
bucket_id = event.payload["bucket_id"]
for updated in event.impacted_records:
collection_id = updated["new"]["id"]
old_schema = updated["old"].get("algolia:settings")
new_schema = updated["new"].get("algolia:settings")
old_settings = updated["old"].get("algolia:settings")
new_settings = updated["new"].get("algolia:settings")
# Create if there was no index before.
if old_schema != new_schema:
indexer.update_index(bucket_id, collection_id, schema=new_schema)
if old_settings != new_settings:
indexer.update_index(bucket_id, collection_id, settings=new_settings)


def on_collection_deleted(event):
Expand Down

0 comments on commit a62d1f0

Please sign in to comment.