diff --git a/app/system/backend/sync_router.py b/app/system/backend/sync_router.py index 2d60e07..a152745 100644 --- a/app/system/backend/sync_router.py +++ b/app/system/backend/sync_router.py @@ -37,13 +37,7 @@ async def sync_from_vtiger() -> Dict[str, Any]: vtiger = get_vtiger_service() # Query vTiger for all accounts with CVR or name - query = """ - SELECT id, accountname, email1, siccode, cf_accounts_cvr, - cf_854, website1, bill_city, bill_code, bill_country - FROM Accounts - WHERE accountname != '' - LIMIT 1000 - """ + query = "SELECT id, accountname, email1, siccode, cf_accounts_cvr, cf_854, website1, bill_city, bill_code, bill_country FROM Accounts WHERE accountname != '' LIMIT 1000;" accounts = await vtiger.query(query) logger.info(f"📥 Fetched {len(accounts)} accounts from vTiger") @@ -175,13 +169,7 @@ async def sync_vtiger_contacts() -> Dict[str, Any]: vtiger = get_vtiger_service() # Query vTiger for contacts - query = """ - SELECT id, firstname, lastname, email, phone, mobile, title, - department, account_id - FROM Contacts - WHERE firstname != '' OR lastname != '' - LIMIT 1000 - """ + query = "SELECT id, firstname, lastname, email, phone, mobile, title, department, account_id FROM Contacts WHERE firstname != '' OR lastname != '' LIMIT 1000;" contacts = await vtiger.query(query) logger.info(f"📥 Fetched {len(contacts)} contacts from vTiger")