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: prevent KeyError when popping an unknown property #552

Closed shortcuts closed 1 year ago

shortcuts commented 1 year ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue fixes https://github.com/algolia/algoliasearch-client-python/pull/550 fixes https://github.com/algolia/algoliasearch-client-python/issues/544
Need Doc update no

https://algolia.atlassian.net/browse/CR-2497 https://algolia.atlassian.net/browse/DI-676

Describe your change

We ensure the key in present before calling pop, to prevent a KeyError returned if it's not found.