fix(register): sale_id/promo_code_id 传None→空字符串,sale_id列NOT NULL

对齐 init_free_customers.dspy 写法。修复 (1048, Column 'sale_id' cannot be null)。
This commit is contained in:
ymq 2026-08-27 12:41:54 +08:00
parent 9b695301ca
commit c13770c416

View File

@ -62,8 +62,8 @@ async with db.sqlorContext(dbname) as sor:
'id': getID(),
'customerid': orgid,
'resellerid': reseller_id,
'sale_id': None,
'promo_code_id': None,
'sale_id': '',
'promo_code_id': '',
'bind_type': '3',
})
debug(f'register: free customer {orgid} bind created (reseller={reseller_id})')