Skip to content

Commit

Permalink
fix callback method mapping of vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrishabh17 committed Jul 20, 2024
1 parent f653a8a commit 30d5946
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/sage300/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ def _sync_data(self, data_gen, attribute_type, display_name, workspace_id, field
source_type = None
mapping_setting = MappingSetting.objects.filter(workspace_id=workspace_id, destination_field=attribute_type).first()
if mapping_setting:
source_type = mapping_setting.source_field if not mapping_setting.is_custom else 'CUSTOM'
if attribute_type == 'VENDOR':
source_type = 'MERCHANT'
elif mapping_setting.is_custom:
source_type = 'CUSTOM'
else:
source_type = mapping_setting.source_field

if is_generator:
for data in data_gen:
Expand Down

0 comments on commit 30d5946

Please sign in to comment.