fix: make prefix required in TenantCreate schema and add frontend validation

prefix was optional with empty default, allowing accounts to be created
with broken account_code (no prefix). Root fix: enforce prefix at input
level rather than patching data after the fact.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
VMIS Developer
2026-03-15 21:45:45 +08:00
parent c96057c1b3
commit a3d5dd2e67
2 changed files with 13 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ from pydantic import BaseModel, EmailStr
class TenantBase(BaseModel):
code: str
prefix: str = ""
prefix: str
name: str
name_eng: Optional[str] = None
tax_id: Optional[str] = None