fix: Remove ge constraint from rounded_to field (v1.3.81)

- Remove ge=0.25 constraint that prevents None values
- Optional fields should accept None without validation
- Fixes approval validation error
This commit is contained in:
Christian 2026-01-02 12:55:37 +01:00
parent 1b5085de21
commit 420507027a
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
1.3.78
1.3.81

View File

@ -114,7 +114,7 @@ class TModuleTimeApproval(BaseModel):
"""Model for wizard approval action"""
time_id: int = Field(..., gt=0)
approved_hours: Decimal = Field(..., gt=0, description="Timer efter godkendelse")
rounded_to: Optional[Decimal] = Field(None, ge=0.25, description="Afrundingsinterval brugt")
rounded_to: Optional[Decimal] = Field(None, description="Afrundingsinterval brugt (0.25, 0.5, 1.0)")
approval_note: Optional[str] = Field(None, description="Brugerens note")
billable: bool = Field(True, description="Skal faktureres?")
is_travel: bool = Field(False, description="Indeholder kørsel?")