Template mapping and detect issue fixed
This commit is contained in:
18
print_fp2.py
Normal file
18
print_fp2.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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!")
|
||||
Reference in New Issue
Block a user