From ec6b3791df2ec42150704e398e31bfa5daac34f4 Mon Sep 17 00:00:00 2001 From: Ashutosh singh <55102089+Ashutosh619-sudo@users.noreply.github.com> Date: Mon, 5 Jun 2023 17:02:50 +0530 Subject: [PATCH] removing restriction for xero app (#80) * removing restriction for xero app * lint issue resolve * removing restriction from stats api * bumbed up the version --------- Co-authored-by: Ashutosh619-sudo --- fyle_accounting_mappings/views.py | 7 +++---- setup.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/fyle_accounting_mappings/views.py b/fyle_accounting_mappings/views.py index 04021cf..80b09cb 100644 --- a/fyle_accounting_mappings/views.py +++ b/fyle_accounting_mappings/views.py @@ -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() @@ -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() @@ -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') @@ -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 diff --git a/setup.py b/setup.py index 761c8f0..649d464 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='fyle-accounting-mappings', - version='1.26.1', + version='1.26.2', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Django application to store the fyle accounting mappings in a generic manner',