Skip to content

Commit

Permalink
removing restriction for xero app (#80)
Browse files Browse the repository at this point in the history
* removing restriction for xero app

* lint issue resolve

* removing restriction from stats api

* bumbed up the version

---------

Co-authored-by: Ashutosh619-sudo <[email protected]>
  • Loading branch information
Ashutosh619-sudo and Ashutosh619-sudo authored Jun 5, 2023
1 parent 8261c75 commit ec6b379
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions fyle_accounting_mappings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def get(self, request, *args, **kwargs):
}

if ((source_type == 'PROJECT' and destination_type == 'CUSTOMER') or\
(source_type == 'CATEGORY')) and app_name != 'XERO':
(source_type == 'CATEGORY')):
filters['active'] = True

total_attributes_count = ExpenseAttribute.objects.filter(**filters).count()
Expand Down Expand Up @@ -224,7 +224,7 @@ def get(self, request, *args, **kwargs):
'workspace_id': self.kwargs['workspace_id']
}
if ((source_type == 'PROJECT' and destination_type == 'CUSTOMER') or\
(source_type == 'CATEGORY')) and app_name != 'XERO':
(source_type == 'CATEGORY')):
filters['source__active'] = True

mapped_attributes_count = Mapping.objects.filter(**filters).count()
Expand Down Expand Up @@ -261,7 +261,6 @@ def get_queryset(self):
mapped = self.request.query_params.get('mapped')
mapping_source_alphabets = self.request.query_params.get('mapping_source_alphabets', '')
mapping_source_alphabets = mapping_source_alphabets.split(',')
app_name = self.request.query_params.get('app_name', None)

assert_valid(source_type is not None, 'query param source_type not found')
assert_valid(destination_type is not None, 'query param source_type not found')
Expand All @@ -279,7 +278,7 @@ def get_queryset(self):
}

if ((source_type == 'PROJECT' and destination_type == 'CUSTOMER') or\
(source_type == 'CATEGORY')) and app_name != 'XERO':
(source_type == 'CATEGORY')):
filters['active'] = True

param = None
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.1',
version='1.26.2',
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 ec6b379

Please sign in to comment.