docs(so-api): [31188f42] Diagnosis of email sending blockade & cleanup
This commit is contained in:
@@ -24,8 +24,9 @@ def create_test_company():
|
||||
return
|
||||
# Check if company already exists
|
||||
existing = client.search(f"Contact?$select=contactId,name&$filter=name eq '{company_name}'")
|
||||
print(f"DEBUG: Raw search response: {existing}")
|
||||
if existing:
|
||||
contact_id = existing[0]['ContactId']
|
||||
contact_id = existing[0]['contactId']
|
||||
print(f"⚠️ Company '{company_name}' already exists with ContactId: {contact_id}.")
|
||||
print("Skipping creation.")
|
||||
return contact_id
|
||||
@@ -42,8 +43,8 @@ def create_test_company():
|
||||
}
|
||||
}
|
||||
new_company = client._post("Contact", payload)
|
||||
if new_company and "ContactId" in new_company:
|
||||
contact_id = new_company["ContactId"]
|
||||
if new_company and "contactId" in new_company:
|
||||
contact_id = new_company["contactId"]
|
||||
print(f"✅ SUCCESS! Created company '{company_name}' with ContactId: {contact_id}")
|
||||
return contact_id
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user