19 lines
675 B
Python
19 lines
675 B
Python
import sys
|
|
import os
|
|
import json
|
|
sys.path.append(os.path.join(os.getcwd(), 'docengine'))
|
|
|
|
from app.core.database import SessionLocal
|
|
from app.models.template import TemplateFingerprint
|
|
from app.models.template import DocumentFormat
|
|
|
|
db = SessionLocal()
|
|
t = db.query(DocumentFormat).filter(DocumentFormat.is_active == True).first()
|
|
if t:
|
|
fp = db.query(TemplateFingerprint).filter(TemplateFingerprint.format_id == t.id).first()
|
|
if fp:
|
|
print(f"Cell Coords items: {len(fp.cell_coordinates.get('items', [])) if fp.cell_coordinates else 'None'}")
|
|
print(json.dumps(fp.cell_coordinates, indent=2))
|
|
else:
|
|
print("No TemplateFingerprint row found!")
|