refactor: the Redesenho line reads its SKU through the shared setting constants

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-12 11:09:49 -03:00
parent 912bab0278
commit 461bd6bbcc

View File

@@ -573,7 +573,7 @@ def order_payload(payload, contact_id, today=None, product_id=None, shipping=Non
# one price (never a band), 48 h. Empty setting means the default code.
if product_id is None:
raise TinyError('TINY_SKU_REDESIGN needs the SKU looked up in Tiny')
code = os.environ.get('TINY_SKU_REDESIGN', '').strip() or 'DTFIMP.AJF.RED'
code = setting(REDESIGN_SKU_SETTING) or REDESIGN_SKU_DEFAULT
arts = int(redesign.get('arts') or 1)
unit = int(redesign.get('unit_cents') or redesign['cents'])
items.append({'produto': {'id': product_id(code)}, 'quantidade': arts,