From e22f91b643e485ab9597504be70ec75c66f2e656 Mon Sep 17 00:00:00 2001 From: Hrishabh Tiwari Date: Fri, 2 Aug 2024 16:13:27 +0530 Subject: [PATCH] fix sync bug --- apps/mappings/connector.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/mappings/connector.py b/apps/mappings/connector.py index 5024e12..b9c9477 100644 --- a/apps/mappings/connector.py +++ b/apps/mappings/connector.py @@ -68,10 +68,10 @@ def sync_custom_field( """ query = { - 'order': 'updated_at.desc', - 'is_custom': 'eq.true', - 'type': 'eq.SELECT', - 'is_enabled': 'eq.true' + 'order': 'updated_at.desc', + 'is_custom': 'eq.true', + 'type': 'eq.SELECT', + 'is_enabled': 'eq.true' } custom_field_gen = self.platform.v1beta.admin.expense_fields.list_all(query) if source_type: @@ -87,7 +87,7 @@ def sync_custom_field( if source_type and source_type == custom_field['field_name']: source_values.extend(custom_field['options']) - if distinct_custom_fields and sync_expense_custom_field_names: + if distinct_custom_fields: field_mapping.custom_fields = distinct_custom_fields field_mapping.save()