From b3c365d773ebeaf2fad710780fc0622e4b732514 Mon Sep 17 00:00:00 2001 From: Gilles Soulier Date: Mon, 25 May 2026 16:13:01 +0200 Subject: [PATCH] =?UTF-8?q?fix(notes):=20GPS=20lat/lon=20s=C3=A9rialis?= =?UTF-8?q?=C3=A9=20en=20float=20au=20lieu=20de=20Decimal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Decimal Python → string JSON causait TypeError: z.toFixed is not a function dans NoteCard (title attribute de l'icône GPS). Tous les champs gps_lat/gps_lon passent maintenant en float | None dans les schémas Pydantic. v0.5.3 Co-Authored-By: Claude Sonnet 4.6 --- backend/app/schemas/notes.py | 13 ++++++------- frontend/package.json | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/backend/app/schemas/notes.py b/backend/app/schemas/notes.py index f34450b..e28daf9 100644 --- a/backend/app/schemas/notes.py +++ b/backend/app/schemas/notes.py @@ -1,6 +1,5 @@ import uuid from datetime import datetime -from decimal import Decimal from pydantic import BaseModel, ConfigDict @@ -19,8 +18,8 @@ class NoteCreate(BaseModel): content: str category: str | None = None tags: list[str] = [] - gps_lat: Decimal | None = None - gps_lon: Decimal | None = None + gps_lat: float | None = None + gps_lon: float | None = None class NoteUpdate(BaseModel): @@ -28,8 +27,8 @@ class NoteUpdate(BaseModel): content: str | None = None category: str | None = None tags: list[str] | None = None - gps_lat: Decimal | None = None - gps_lon: Decimal | None = None + gps_lat: float | None = None + gps_lon: float | None = None class NoteResponse(BaseModel): @@ -39,7 +38,7 @@ class NoteResponse(BaseModel): content: str category: str | None tags: list[str] - gps_lat: Decimal | None - gps_lon: Decimal | None + gps_lat: float | None + gps_lon: float | None created_at: datetime attachments: list[AttachmentResponse] diff --git a/frontend/package.json b/frontend/package.json index db24d0a..19512e2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "homehub-frontend", "private": true, - "version": "0.5.2", + "version": "0.5.3", "type": "module", "scripts": { "dev": "vite",