Skip to content

Commit

Permalink
resolving comments
Browse files Browse the repository at this point in the history
  • Loading branch information
labhvam5 committed Dec 3, 2023
1 parent 156e029 commit 496102e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/mappings/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,11 @@ def construct_tasks_and_chain_import_fields_to_fyle(workspace_id):
}

if workspace_general_settings.import_categories or workspace_general_settings.import_items:
destination_sync_methods = []
if workspace_general_settings.import_categories:
destination_sync_methods = [SYNC_METHODS['ACCOUNT']]
destination_sync_methods.append(SYNC_METHODS['ACCOUNT'])
if workspace_general_settings.import_items:
items_sync_method = [SYNC_METHODS['ITEM']]
if destination_sync_methods:
destination_sync_methods = destination_sync_methods.append(SYNC_METHODS['ITEM']) if destination_sync_methods else items_sync_method
destination_sync_methods.append(SYNC_METHODS['ITEM'])

task_settings['import_categories'] = {
'destination_field': 'ACCOUNT',
Expand Down
1 change: 1 addition & 0 deletions apps/workspaces/apis/import_settings/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
schedule_tax_groups_creation,
)
from apps.workspaces.models import WorkspaceGeneralSettings
from apps.mappings.schedules import schedule_or_delete_fyle_import_tasks as new_schedule_or_delete_fyle_import_tasks


class ImportSettingsTrigger:
Expand Down

0 comments on commit 496102e

Please sign in to comment.