feat: Prumo tells the card and the customer what it did (front 6)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 4m41s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m6s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 4m41s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m6s
Every order now carries a short report of the decisions that happened: original format, conversion, resolution, background, residue, montage, billed length, contraction, thin-stroke warning, parts and generation time. The card shows it above the file; the payment summary shows the customer's version. The upload keeps the original name so a renamed CDR/PDF is told.
This commit is contained in:
@@ -14,7 +14,7 @@ from ..core.auth import owner
|
||||
from ..core.models import QuoteRequest
|
||||
from ..core.pricing import price
|
||||
from .. import quote_review
|
||||
from ..grade_check import Files, mismatch, resolution_issue
|
||||
from ..grade_check import Files, mismatch, resolution_issue, source_dpi
|
||||
from ..runtime import freight, payment, quote_view, require_delivery_available, storage, upload_row
|
||||
from ..scanning import require_clean
|
||||
|
||||
@@ -59,6 +59,16 @@ def create_quote(body: QuoteRequest, session_id=Depends(owner)):
|
||||
# longer sets the price): before a cart is approved at checkout, the
|
||||
# server works it out from the files.
|
||||
files = Files(storage)
|
||||
# Record the lowest source resolution for the Prumo report (front 6).
|
||||
for draft_item, item in zip(draft['items'], body.items):
|
||||
dpis = []
|
||||
for source in item.production.sources:
|
||||
row = rows.get(str(source.upload_id))
|
||||
dpi = source_dpi(files, row, source.model_dump(mode='json')) if row else None
|
||||
if dpi:
|
||||
dpis.append(dpi)
|
||||
if dpis:
|
||||
draft_item['source_dpi'] = round(min(dpis))
|
||||
issue = resolution_issue(files, draft['items'], rows)
|
||||
if issue:
|
||||
raise HTTPException(422, issue)
|
||||
|
||||
Reference in New Issue
Block a user