Skip to content

Commit 795ce60

Browse files
author
Akop Kesheshyan
authored
Merge pull request #3 from akopkesheshyan/issue2
fixed TypeError on calling tasks API #2
2 parents b2d486e + 63c8117 commit 795ce60

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

bitrix24/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Copyright (c) 2019 by Akop Kesheshyan.
2222
"""
2323

24-
__version__ = '1.1.0'
24+
__version__ = '1.1.1'
2525
__author__ = 'Akop Kesheshyan <akop.kesheshyan@icloud.com>'
2626
__license__ = 'MIT'
2727
__copyright__ = 'Copyright 2019 Akop Kesheshyan'

bitrix24/bitrix24.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,11 @@ def callMethod(self, method, **params):
101101
params['start'] = 0
102102
if 'next' in r and r['total'] > params['start']:
103103
params['start'] += 50
104-
return r['result'] + self.callMethod(method, **params)
104+
data = self.callMethod(method, **params)
105+
if isinstance(r['result'], dict):
106+
result = r['result'].copy()
107+
result.update(data)
108+
else:
109+
result = r['result'] + data
110+
return result
105111
return r['result']

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
setup(
2727
name='bitrix24-rest',
28-
version='1.1.0',
28+
version='1.1.1',
2929
install_requires=['requests'],
3030
packages=find_packages(),
3131
url='https://github.com/akopkesheshyan/bitrix24-python-rest',

0 commit comments

Comments
 (0)