Skip to content

Commit

Permalink
fix passing source_account_type in the query params filter (#24)
Browse files Browse the repository at this point in the history
fix passing source_account_type in the query params filter (#24)
  • Loading branch information
Sravanksk authored Apr 4, 2022
1 parent 5ffc26e commit e231f1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __construct_expenses_query_params(source_account_type: List[str], state: str

source_account_type_filter = ['PERSONAL_CASH_ACCOUNT']
if len(source_account_type) == 1:
source_account_type_filter = 'eq.{}'.format(source_account_type_filter[0])
source_account_type_filter = 'eq.{}'.format(source_account_type[0])
elif len(source_account_type) > 1 and 'PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT' in source_account_type:
source_account_type_filter.append('PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT')
source_account_type_filter = 'in.{}'.format(tuple(source_account_type_filter)).replace("'", '"')
Expand Down Expand Up @@ -129,6 +129,7 @@ def __construct_expenses_objects(self, expenses: List[dict]) -> List[dict]:
objects.append({
'id': expense['id'],
'employee_email': expense['employee']['user']['email'],
'employee_name': expense['employee']['user']['full_name'],
'category': expense['category']['name'],
'sub_category': expense['category']['sub_category'],
'project': expense['project']['name'] if expense['project'] else None,
Expand Down
2 changes: 1 addition & 1 deletion connector/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='fyle-integrations-platform-connector',
version='1.9.0',
version='1.10.0',
author='Shwetabh Kumar',
author_email='[email protected]',
description='A common platform connector for all the Fyle Integrations to interact with Fyle Platform APIs',
Expand Down

0 comments on commit e231f1f

Please sign in to comment.