fix: Remove float() conversion for Decimal fields (v1.3.78)

- Let Pydantic handle Decimal conversion
- Send approved_hours as Decimal, not float
- Send rounded_to as Decimal, not float
- Add exc_info=True to error logging
This commit is contained in:
Christian 2026-01-02 12:51:12 +01:00
parent 17cd871909
commit e45b1ed19e
2 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
1.3.77
1.3.78

View File

@ -289,8 +289,8 @@ async def approve_time_entry(
# Godkend med alle felter
approval = TModuleTimeApproval(
time_id=time_id,
approved_hours=float(approved_hours),
rounded_to=float(rounded_to) if rounded_to else None,
approved_hours=approved_hours,
rounded_to=rounded_to,
approval_note=request.get('approval_note'),
billable=True, # Default til fakturerbar
is_travel=request.get('is_travel', False)
@ -300,7 +300,7 @@ async def approve_time_entry(
except HTTPException:
raise
except Exception as e:
logger.error(f"❌ Error approving entry: {e}")
logger.error(f"❌ Error approving entry: {e}", exc_info=True)
raise HTTPException(status_code=500, detail=str(e))