From 30d59462393c817c95d731d13cc793057530d5ac Mon Sep 17 00:00:00 2001 From: Hrishabh Tiwari Date: Sat, 20 Jul 2024 19:48:27 +0530 Subject: [PATCH] fix callback method mapping of vendor --- apps/sage300/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/sage300/utils.py b/apps/sage300/utils.py index dc63490..4b9ce50 100644 --- a/apps/sage300/utils.py +++ b/apps/sage300/utils.py @@ -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: