Krukov / amocrm_api

Python amocrm API wrapper
MIT License
104 stars 55 forks source link

KeyError: '_links' при попытке забрать все статусы из воронки #75

Closed vprsnc closed 1 year ago

vprsnc commented 2 years ago

KeyError Traceback (most recent call last) Input In [6], in ----> 1 list(Status.get_for("4483554").filter())

File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/amocrm/v2/manager.py:27, in Manager.filter(self, *args, kwargs) 26 def filter(self, *args, *kwargs): ---> 27 for data in self._interaction.get_all(args, include=self._model._get_embedded_fields(), kwargs): 28 yield self._model(data=data)

File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/amocrm/v2/entity/pipeline.py:17, in StatusesInteraction.get_all(self, include, query, filters, order) 16 def get_all(self, include=None, query=None, filters=(), order=None): ---> 17 for data in self._all(self._get_path(), include=include, query=None, filters=filters, order=order): 18 for status_data in data[self._get_field()]: 19 if not query or status_data["name"].lower() == query.lower():

File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/amocrm/v2/interaction.py:83, in BaseInteraction._all(self, path, include, query, filters, order, limit) 81 return 82 yield response["_embedded"] ---> 83 if "next" not in response["_links"]: 84 return 85 page += 1

KeyError: '_links'