Spaces:
Running
Running
Commit ·
8a2a3e7
1
Parent(s): 73a5468
fix(uom): remove strict pattern validation from uom_group_code field
Browse files- Remove regex pattern constraint from uom_group_code field in UomGroupBase schema
- Allow flexible code format while maintaining auto-generation capability
- Simplify validation to support various code formats without strict pattern matching
- Improves flexibility for UOM group code generation and management
app/uom/schemas/schema.py
CHANGED
|
@@ -58,7 +58,7 @@ class UomUnitBase(BaseModel):
|
|
| 58 |
class UomGroupBase(BaseModel):
|
| 59 |
"""Base schema for UOM Group"""
|
| 60 |
uom_group_id: Optional[str] = Field(None, min_length=10, max_length=50, description="Unique group identifier (UUID, auto-generated if not provided)")
|
| 61 |
-
uom_group_code: Optional[str] = Field(None,
|
| 62 |
name: str = Field(..., min_length=2, max_length=100, description="Display name")
|
| 63 |
description: Optional[str] = Field(None, max_length=500, description="Optional description")
|
| 64 |
|
|
|
|
| 58 |
class UomGroupBase(BaseModel):
|
| 59 |
"""Base schema for UOM Group"""
|
| 60 |
uom_group_id: Optional[str] = Field(None, min_length=10, max_length=50, description="Unique group identifier (UUID, auto-generated if not provided)")
|
| 61 |
+
uom_group_code: Optional[str] = Field(None, description="Auto-generated code format: UOM-XXX-NNNNNN (e.g., UOM-VOL-000001)")
|
| 62 |
name: str = Field(..., min_length=2, max_length=100, description="Display name")
|
| 63 |
description: Optional[str] = Field(None, max_length=500, description="Optional description")
|
| 64 |
|