fix(validators): update part_number_id validation to be optional in item creation

This commit is contained in:
Galindo97
2026-01-22 12:26:57 -06:00
parent af863e624f
commit 0782e784ac
2 changed files with 3 additions and 9 deletions

View File

@@ -33,14 +33,8 @@ def validate_create(
code="REQUIRED"
)
# 2. Validar part_number_id
if not line.part_number_id:
errors.add_error(
field="part_number_id",
message="Part Number ID es obligatorio",
solution="Selecciona un número de parte válido del catálogo",
code="REQUIRED"
)
# 2. Validar part_number_id (OPCIONAL - ya no es obligatorio)
# El campo part_number_id ahora es opcional
# 3. Validar class_id
if not line.class_id: