Skip to content

Commit

Permalink
bug-fix for ccc_category_mapping (#85)
Browse files Browse the repository at this point in the history
* bug-fix for ccc_category_mapping

* adding static keyword
  • Loading branch information
labhvam5 authored Sep 8, 2023
1 parent ba882d5 commit 719b5f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions fyle_accounting_mappings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,15 @@ def bulk_create_ccc_category_mappings(workspace_id: int):

for category_mapping in category_mappings:
ccc_account_id = None
if category_mapping.destination_expense_head.detail['gl_account_no'].lower() in destination_id_pk_map:

if category_mapping.destination_expense_head.detail and \
'gl_account_no' in category_mapping.destination_expense_head.detail and\
category_mapping.destination_expense_head.detail['gl_account_no'].lower() in destination_id_pk_map:
ccc_account_id = destination_id_pk_map[category_mapping.destination_expense_head.detail['gl_account_no'].lower()]
elif category_mapping.destination_expense_head.detail['account_internal_id'].lower() in destination_id_pk_map:

elif category_mapping.destination_expense_head.detail and \
'account_internal_id' in category_mapping.destination_expense_head.detail and \
category_mapping.destination_expense_head.detail['account_internal_id'].lower() in destination_id_pk_map:
ccc_account_id = destination_id_pk_map[category_mapping.destination_expense_head.detail['account_internal_id'].lower()]

mapping_updation_batch.append(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name='fyle-accounting-mappings',
version='1.26.4',
version='1.26.5',
author='Shwetabh Kumar',
author_email='[email protected]',
description='Django application to store the fyle accounting mappings in a generic manner',
Expand Down

0 comments on commit 719b5f5

Please sign in to comment.