[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
45
connector-superoffice/tools/blind_check_associates.py
Normal file
45
connector-superoffice/tools/blind_check_associates.py
Normal file
@@ -0,0 +1,45 @@
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
|
||||
# Absolute path setup
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
connector_dir = os.path.abspath(os.path.join(current_dir, '..'))
|
||||
sys.path.insert(0, connector_dir)
|
||||
|
||||
from superoffice_client import SuperOfficeClient
|
||||
|
||||
def blind_check():
|
||||
print("🕵️ Testing Manuel's Filter: contactAssociate/contactFullName eq 'RoboPlanet GmbH'")
|
||||
client = SuperOfficeClient()
|
||||
if not client.access_token:
|
||||
print("❌ Auth failed.")
|
||||
return
|
||||
|
||||
# Manuel's filter logic with Count
|
||||
endpoint = "Contact?$filter=contactAssociate/contactFullName eq 'RoboPlanet GmbH'&$top=0&$count=true"
|
||||
|
||||
print(f"📡 Querying: {endpoint}")
|
||||
try:
|
||||
resp = client._get(endpoint)
|
||||
count = resp.get('@odata.count')
|
||||
print(f"\n🎯 RESULT: Manuel's Filter found {count} accounts.")
|
||||
|
||||
if count == 17014:
|
||||
print("✅ PERFECT MATCH! Manuel's filter matches your UI count exactly.")
|
||||
else:
|
||||
print(f"ℹ️ Delta to UI: {17014 - (count or 0)}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Manuel's filter failed: {e}")
|
||||
# Try without spaces encoded
|
||||
print("Trying with encoded spaces...")
|
||||
try:
|
||||
endpoint_enc = "Contact?$filter=contactAssociate/contactFullName eq 'RoboPlanet+GmbH'&$top=0&$count=true"
|
||||
resp = client._get(endpoint_enc)
|
||||
print(f"🎯 Encoded Result: {resp.get('@odata.count')}")
|
||||
except:
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
blind_check()
|
||||
Reference in New Issue
Block a user