From 9de059e9ca32e3bc9994eec29062c93dd7afc1fe Mon Sep 17 00:00:00 2001 From: ronalds Date: Thu, 4 Dec 2025 11:30:22 -0300 Subject: [PATCH] v1.1.2 - Fix campo photo_requirement en schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BACKEND: - Agregado campo photo_requirement a QuestionBase schema - Ahora acepta valores: 'none', 'optional', 'required' - Permite crear/actualizar preguntas con configuración de adjuntos - Marcado allow_photos como DEPRECATED (mantener por compatibilidad) - Backend v1.1.2 FRONTEND: - Sin cambios (v1.2.4) - ya enviaba correctamente el campo --- backend/app/main.py | 2 +- backend/app/schemas.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/app/main.py b/backend/app/main.py index 42ee6a1..4e96b7b 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -276,7 +276,7 @@ def extract_pdf_text_smart(pdf_content: bytes, max_chars: int = None) -> dict: } -BACKEND_VERSION = "1.1.1" +BACKEND_VERSION = "1.1.2" app = FastAPI(title="Checklist Inteligente API", version=BACKEND_VERSION) # S3/MinIO configuration diff --git a/backend/app/schemas.py b/backend/app/schemas.py index dbd2279..5ac40ed 100644 --- a/backend/app/schemas.py +++ b/backend/app/schemas.py @@ -119,7 +119,8 @@ class QuestionBase(BaseModel): # Scale: {"type": "scale", "min": 1, "max": 5, "step": 1, "labels": {"min": "Muy malo", "max": "Excelente"}} # Text: {"type": "text", "multiline": true, "max_length": 500} order: int = 0 - allow_photos: bool = True + allow_photos: bool = True # DEPRECATED: mantener por compatibilidad + photo_requirement: Optional[str] = 'optional' # none, optional, required max_photos: int = 3 requires_comment_on_fail: bool = False send_notification: bool = False