diff --git a/apps/mappings/tasks.py b/apps/mappings/tasks.py index 59d31f07..4765858d 100644 --- a/apps/mappings/tasks.py +++ b/apps/mappings/tasks.py @@ -239,7 +239,13 @@ def create_fyle_categories_payload(categories: List[DestinationAttribute], works if updated_categories: for category in updated_categories: destination_id_of_category = category.mapping.first().destination.destination_id - payload.append({'id': category.source_id, 'name': category.value, 'code': destination_id_of_category, 'is_enabled': category.active}) + payload.append({ + 'id': category.source_id, + 'name': category.value, + 'code': destination_id_of_category, + # Always keep Unspecified category enabled + 'is_enabled': category.active if category.value != 'Unspecified' else True + }) else: existing_category_names = ExpenseAttribute.objects.filter(attribute_type='CATEGORY', workspace_id=workspace_id).values_list('value', flat=True)