Skip to content

Commit

Permalink
bug fix: fix duplicate creation of projects (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
NileshPant1999 authored May 18, 2023
1 parent a285295 commit 8261c75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions fyle_accounting_mappings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,11 @@ def create_or_update_expense_fields(attributes: List[Dict], fields_included: Lis
if expense_field['field_name'] in fields_included or expense_field['type'] == 'DEPENDENT_SELECT':
expense_fields, _ = ExpenseField.objects.update_or_create(
attribute_type=expense_field['field_name'].replace(' ', '_').upper(),
source_field_id=expense_field['id'],
workspace_id=workspace_id,
is_enabled=expense_field['active'] if 'active' in expense_field else False,
defaults={
'source_field_id': expense_field['id'],
'is_enabled': expense_field['is_enabled'] if 'is_enabled' in expense_field else False
}
)

return expense_fields
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.0',
version='1.26.1',
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 8261c75

Please sign in to comment.