Skip to content

Commit

Permalink
Fixed the None error in sync_method (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrishabh17 authored Mar 27, 2024
1 parent 9b95eca commit 32be5e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/mappings/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def construct_tasks_and_chain_import_fields_to_fyle(workspace_id: int):
if mapping_settings:
for mapping_setting in mapping_settings:
if mapping_setting.source_field in ALLOWED_SOURCE_FIELDS or mapping_setting.is_custom:
destination_sync_methods = [SYNC_METHODS.get(mapping_setting.destination_field.upper()), 'custom_segments']
destination_sync_methods = [SYNC_METHODS.get(mapping_setting.destination_field.upper(), 'custom_segments')]

if mapping_setting.destination_field == 'PROJECT':
destination_sync_methods.append(SYNC_METHODS['CUSTOMER'])
Expand Down
2 changes: 1 addition & 1 deletion apps/mappings/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def run_pre_mapping_settings_triggers(sender, instance: MappingSetting, **kwargs
destination_field=instance.destination_field,
sync_after=last_successful_run_at,
sdk_connection=netsuite_connection,
destination_sync_methods=[SYNC_METHODS.get(instance.destination_field.upper()), 'custom_segments']
destination_sync_methods=[SYNC_METHODS.get(instance.destination_field.upper(), 'custom_segments')]
)

fyle_credentials = FyleCredential.objects.get(workspace_id=workspace_id)
Expand Down
2 changes: 1 addition & 1 deletion apps/netsuite/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def post(self, request, *args, **kwargs):
for mapping_setting in mapping_settings:
if mapping_setting.source_field in ALLOWED_SOURCE_FIELDS or mapping_setting.is_custom:
# run new_schedule_or_delete_fyle_import_tasks
destination_sync_methods = [SYNC_METHODS.get(mapping_setting.destination_field.upper()), 'custom_segments']
destination_sync_methods = [SYNC_METHODS.get(mapping_setting.destination_field.upper(), 'custom_segments')]

if mapping_setting.destination_field == 'PROJECT':
destination_sync_methods.append(SYNC_METHODS['CUSTOMER'])
Expand Down

0 comments on commit 32be5e3

Please sign in to comment.