diff --git a/fyle_accounting_mappings/models.py b/fyle_accounting_mappings/models.py index 10721c7..743c85e 100644 --- a/fyle_accounting_mappings/models.py +++ b/fyle_accounting_mappings/models.py @@ -193,9 +193,9 @@ def create_or_update_mapping(source_type: str, destination_type: str, mapping, _ = Mapping.objects.update_or_create( source_type=source_type, - source=ExpenseAttribute.objects.get( - attribute_type=source_type, value=source_value, workspace_id=workspace_id - ) if source_value else None, + source=ExpenseAttribute.objects.filter( + attribute_type=source_type, value__iexact=source_value, workspace_id=workspace_id + ).first() if source_value else None, destination_type=destination_type, workspace=Workspace.objects.get(pk=workspace_id), defaults={ diff --git a/setup.py b/setup.py index 541b519..c58be5a 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='fyle-accounting-mappings', - version='0.9.0', + version='0.10.0', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Django application to store the fyle accounting mappings in a generic manner',