Skip to content

Commit

Permalink
fix: default tax code (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
anishfyle authored Oct 10, 2024
1 parent 8fb1408 commit cf1a290
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/workspaces/apis/import_settings/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def get_workspace_id(self, instance):
def update(self, instance, validated_data):

configurations = validated_data.pop('configuration')
general_mappings = validated_data.pop('general_mappings')
mapping_settings = validated_data.pop('mapping_settings')

configurations_instance, _ = Configuration.objects.update_or_create(
Expand All @@ -123,6 +124,8 @@ def update(self, instance, validated_data):
'import_netsuite_employees': configurations.get('import_netsuite_employees')
},
)

GeneralMapping.objects.update_or_create(workspace=instance, defaults={'default_tax_code_name': general_mappings.get('default_tax_code').get('name'), 'default_tax_code_id': general_mappings.get('default_tax_code').get('id')})

trigger: ImportSettingsTrigger = ImportSettingsTrigger(configurations=configurations, mapping_settings=mapping_settings, workspace_id=instance.id)

Expand Down

0 comments on commit cf1a290

Please sign in to comment.