From 2716810a48ab89741b52a193a4d2a55d27ba7cbe Mon Sep 17 00:00:00 2001 From: ruuushhh Date: Tue, 6 Feb 2024 14:42:31 +0530 Subject: [PATCH 1/4] Django q2 support --- fyle_rest_auth/helpers.py | 10 ++++++++-- requirements.txt | 3 +-- setup.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fyle_rest_auth/helpers.py b/fyle_rest_auth/helpers.py index be2c966..c55d1b2 100644 --- a/fyle_rest_auth/helpers.py +++ b/fyle_rest_auth/helpers.py @@ -78,7 +78,10 @@ def validate_code_and_login(request): and settings.FYLE_REST_AUTH_SETTINGS['async_update_user']: async_task( 'apps.workspaces.tasks.async_update_fyle_credentials', - employee_info['data']['org']['id'], tokens['refresh_token'] + employee_info['data']['org']['id'], tokens['refresh_token'], + q_options={ + 'cluster': 'import' + } ) return tokens @@ -133,7 +136,10 @@ def validate_refresh_token_and_login(request): and settings.FYLE_REST_AUTH_SETTINGS['async_update_user']: async_task( 'apps.workspaces.tasks.async_update_fyle_credentials', - employee_info['data']['org']['id'], tokens['refresh_token'] + employee_info['data']['org']['id'], tokens['refresh_token'], + q_options={ + 'cluster': 'import' + } ) return tokens diff --git a/requirements.txt b/requirements.txt index c2b6f8f..cecab13 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,10 +3,9 @@ astroid==2.3.3 certifi==2022.12.7 chardet==3.0.4 charset-normalizer==2.0.8 -Django==3.1.14 +Django==3.2.14 django-rest-framework==0.1.0 djangorestframework==3.11.2 -django-q==1.3.4 idna==2.8 isort==4.3.21 lazy-object-proxy==1.4.3 diff --git a/setup.py b/setup.py index 242962b..f5ffb12 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='fyle-rest-auth', - version='1.6.0', + version='1.7.0', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Django application to implement OAuth 2.0 using Fyle in Django rest framework', From cfdae415fee151b0cb7186c2ea2bab2f596d8809 Mon Sep 17 00:00:00 2001 From: ruuushhh Date: Tue, 6 Feb 2024 14:49:42 +0530 Subject: [PATCH 2/4] comments fixed --- fyle_rest_auth/helpers.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fyle_rest_auth/helpers.py b/fyle_rest_auth/helpers.py index c55d1b2..3dfd2cf 100644 --- a/fyle_rest_auth/helpers.py +++ b/fyle_rest_auth/helpers.py @@ -79,9 +79,6 @@ def validate_code_and_login(request): async_task( 'apps.workspaces.tasks.async_update_fyle_credentials', employee_info['data']['org']['id'], tokens['refresh_token'], - q_options={ - 'cluster': 'import' - } ) return tokens @@ -137,9 +134,6 @@ def validate_refresh_token_and_login(request): async_task( 'apps.workspaces.tasks.async_update_fyle_credentials', employee_info['data']['org']['id'], tokens['refresh_token'], - q_options={ - 'cluster': 'import' - } ) return tokens From a3ff2faaeda86f9becd35d01a4a39b631b8c99c9 Mon Sep 17 00:00:00 2001 From: ruuushhh Date: Tue, 6 Feb 2024 14:50:43 +0530 Subject: [PATCH 3/4] comments fixed --- fyle_rest_auth/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fyle_rest_auth/helpers.py b/fyle_rest_auth/helpers.py index 3dfd2cf..be2c966 100644 --- a/fyle_rest_auth/helpers.py +++ b/fyle_rest_auth/helpers.py @@ -78,7 +78,7 @@ def validate_code_and_login(request): and settings.FYLE_REST_AUTH_SETTINGS['async_update_user']: async_task( 'apps.workspaces.tasks.async_update_fyle_credentials', - employee_info['data']['org']['id'], tokens['refresh_token'], + employee_info['data']['org']['id'], tokens['refresh_token'] ) return tokens @@ -133,7 +133,7 @@ def validate_refresh_token_and_login(request): and settings.FYLE_REST_AUTH_SETTINGS['async_update_user']: async_task( 'apps.workspaces.tasks.async_update_fyle_credentials', - employee_info['data']['org']['id'], tokens['refresh_token'], + employee_info['data']['org']['id'], tokens['refresh_token'] ) return tokens From f19af1bc69f9d182ff0ba9ae3972f8633c50fc63 Mon Sep 17 00:00:00 2001 From: ruuushhh Date: Tue, 6 Feb 2024 16:11:07 +0530 Subject: [PATCH 4/4] comments fixed --- requirements.txt | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cecab13..d094c82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,3 +20,4 @@ sqlparse==0.3.0 typed-ast==1.4.1 urllib3==1.26.5 wrapt==1.11.2 +fyle-djangoq2==1.0.0 diff --git a/setup.py b/setup.py index f5ffb12..809f7a2 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ url='https://github.com/fylein/fyle-rest-auth', packages=setuptools.find_packages(), install_requires=['requests>=2.25.0', 'django>=3.0.2', - 'django-rest-framework==0.1.0', 'django-q>=1.3.3'], + 'django-rest-framework==0.1.0'], include_package_data=True, classifiers=[ 'Framework :: Django',