Fix: Convert vTiger SQL queries to single-line (API requires no line breaks)
This commit is contained in:
parent
c2cf8cf5a3
commit
8bc633d59c
@ -37,13 +37,7 @@ async def sync_from_vtiger() -> Dict[str, Any]:
|
|||||||
vtiger = get_vtiger_service()
|
vtiger = get_vtiger_service()
|
||||||
|
|
||||||
# Query vTiger for all accounts with CVR or name
|
# Query vTiger for all accounts with CVR or name
|
||||||
query = """
|
query = "SELECT id, accountname, email1, siccode, cf_accounts_cvr, cf_854, website1, bill_city, bill_code, bill_country FROM Accounts WHERE accountname != '' LIMIT 1000;"
|
||||||
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)
|
accounts = await vtiger.query(query)
|
||||||
logger.info(f"📥 Fetched {len(accounts)} accounts from vTiger")
|
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()
|
vtiger = get_vtiger_service()
|
||||||
|
|
||||||
# Query vTiger for contacts
|
# Query vTiger for contacts
|
||||||
query = """
|
query = "SELECT id, firstname, lastname, email, phone, mobile, title, department, account_id FROM Contacts WHERE firstname != '' OR lastname != '' LIMIT 1000;"
|
||||||
SELECT id, firstname, lastname, email, phone, mobile, title,
|
|
||||||
department, account_id
|
|
||||||
FROM Contacts
|
|
||||||
WHERE firstname != '' OR lastname != ''
|
|
||||||
LIMIT 1000
|
|
||||||
"""
|
|
||||||
|
|
||||||
contacts = await vtiger.query(query)
|
contacts = await vtiger.query(query)
|
||||||
logger.info(f"📥 Fetched {len(contacts)} contacts from vTiger")
|
logger.info(f"📥 Fetched {len(contacts)} contacts from vTiger")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user