-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extract_from_batch_response #235
Comments
Спасибо, посмотрю попозже |
А можете приложить полный лог выполнения вышеописанного кода? |
что-то типа такого |
leshchenko1979
added a commit
that referenced
this issue
May 21, 2024
leshchenko1979
added a commit
that referenced
this issue
May 21, 2024
* Fix and simplify extraction of nested single item non-batch results Fixes #235 * Remove double spaces
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Проблема в методе
extract_from_batch_response
, в файлеfast_bitrix24/server_response.py
.Код, который я выполняю:
Вот ссылка на используемый мной метод Bitrix24 REST API:
https://dev.1c-bitrix.ru/rest_help/crm/dynamic/methodscrmitem/crm_item_add.php
Вот такой результат я получаю:
"item"
Следуя по шагам выполнения, выясняю, что в функцию
extract_from_batch_response
приходит данный словарь, что в целом приемлемый для меня ответ от api, и с которым я бы мог работать:однако после условия:
if self.is_nested(first_item) or isinstance(first_item, list):
результатом метода становится один из ключей
"item"
.Конкретно, весь словарь обрезается в момент:
result_list = list(chain(*result_list))
Избавившись от этого преобразования, у меня получилось получить то, что я хотел. Но я понимаю, что в этой части кода был какой-то смысл, поэтому жду ответа от вас.
Думаю проблема в том, что это взаимодействие с каким-то кастомным смарт-процессом, и подобный вывод не был предусмотрен в разработки библиотеки.
The text was updated successfully, but these errors were encountered: