Agregar en el Modal campo de Nro Operario back y front
This commit is contained in:
@@ -886,8 +886,12 @@ def create_inspection(
|
||||
if not checklist:
|
||||
raise HTTPException(status_code=404, detail="Checklist no encontrado")
|
||||
|
||||
# Crear inspección con el employee_code del mecánico actual
|
||||
inspection_data = inspection.dict()
|
||||
inspection_data['mechanic_employee_code'] = current_user.employee_code # Agregar código de operario automáticamente
|
||||
|
||||
db_inspection = models.Inspection(
|
||||
**inspection.dict(),
|
||||
**inspection_data,
|
||||
mechanic_id=current_user.id,
|
||||
max_score=checklist.max_score
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user