[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:
22
ARCHIVE_legacy_scripts/test_api_logic.py
Normal file
22
ARCHIVE_legacy_scripts/test_api_logic.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Add the company-explorer directory to the Python path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.getcwd(), 'company-explorer')))
|
||||
|
||||
from backend.database import SessionLocal, MarketingMatrix, Industry, Persona
|
||||
from sqlalchemy.orm import joinedload
|
||||
|
||||
db = SessionLocal()
|
||||
try:
|
||||
query = db.query(MarketingMatrix).options(
|
||||
joinedload(MarketingMatrix.industry),
|
||||
joinedload(MarketingMatrix.persona)
|
||||
)
|
||||
entries = query.all()
|
||||
print(f"Total entries: {len(entries)}")
|
||||
for e in entries[:3]:
|
||||
print(f"ID={e.id}, Industry={e.industry.name if e.industry else 'N/A'}, Persona={e.persona.name if e.persona else 'N/A'}")
|
||||
print(f" Subject: {e.subject}")
|
||||
finally:
|
||||
db.close()
|
||||
Reference in New Issue
Block a user