feat: Montar takes Dropstar's dotted codes and reads the size from the file name
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Codes like NX.226 and NX.1003 are allowed in the page, the API and the stamps table (a dot anywhere but first). A file's own size is a dot and its letter before .png (Marcus, 2026-11-16): NX.226.C.png is NX.226 in C, so nobody renames the library. Montar takes the size asked for, else the code without a size, else another size of it scaled (the closest larger one, else the largest) and says which file it was made from; the DPI warning still applies. The <code>-<size>.png form is no longer read. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,8 @@ from .uploads import begin_upload
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
CODE = re.compile(r'^[A-Za-z0-9_-]{1,40}$')
|
||||
# Dropstar's codes carry dots (NX.226); not as the first character.
|
||||
CODE = re.compile(r'^[A-Za-z0-9_-][A-Za-z0-9._-]{0,39}$')
|
||||
INTERNAL_MISSING = 'Peça à Gestão para completar o cliente interno.'
|
||||
# Who chooses which kind of order in the montador (Marcus, 2026-11-10): the
|
||||
# Expedição only Interno, the Vendedor only Venda; Gestão and the
|
||||
|
||||
5
app/migrations/202611161600_stamp-code-dot.sql
Normal file
5
app/migrations/202611161600_stamp-code-dot.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Dropstar's stamp codes carry dots (NX.226, Marcus 2026-11-16); not as the
|
||||
-- first character, as in app/api/stamps.py CODE.
|
||||
ALTER TABLE dtf_local.stamps DROP CONSTRAINT IF EXISTS stamps_code_check;
|
||||
ALTER TABLE dtf_local.stamps ADD CONSTRAINT stamps_code_check
|
||||
CHECK (code ~ '^[A-Za-z0-9_-][A-Za-z0-9._-]{0,39}$');
|
||||
Reference in New Issue
Block a user