Skip to content

Commit

Permalink
Estado para Vehiculos al crear
Browse files Browse the repository at this point in the history
  • Loading branch information
logos914 committed Nov 20, 2024
1 parent aeb4c53 commit 6ffc834
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routes/vehiculos.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def cargar_vehiculo():
modelo_id = int(request.form['modelo'])
patente = str(request.form['patente'])
kilometraje = int(request.form['kilometraje'])
estado = str(request.form['estado'])

modelo = ModeloVehiculo.encontrarPorId(modelo_id)
if not modelo:
Expand All @@ -29,7 +30,8 @@ def cargar_vehiculo():
nuevo_vehiculo = Vehiculo(
modelo=modelo,
matricula=patente,
kilometraje=kilometraje
kilometraje=kilometraje,
estado=estado
)

Vehiculo.agregar(nuevo_vehiculo)
Expand Down

0 comments on commit 6ffc834

Please sign in to comment.