algolia / algoliasearch-client-python

⚡️ A fully-featured and blazing-fast Python API client to interact with Algolia.
https://www.algolia.com/doc/api-client/getting-started/install/python/?language=python
MIT License
196 stars 67 forks source link

Fix: preventing KeyError("_highlightResult") #550

Closed JeheeChoi closed 1 year ago

JeheeChoi commented 1 year ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue Fix #544
Need Doc update no

Describe your change

Checking if the _highlightResult key is present before calling the pop method in the iterators.py file on line 58

if ("_highlightResult" in hit):
                    hit.pop("_highlightResult")

What problem is this fixing?

Prevent returning error - KeyError: ‘_highlightResult’ while using browse_rules() method