From d8b26c03de626e2783aa9c111359ec44c0b21f27 Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 18 Sep 2017 09:17:18 +0200 Subject: [PATCH] whyyyyyyyy --- server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 6b2c506..bbf9207 100644 --- a/server.py +++ b/server.py @@ -472,8 +472,10 @@ def page_disp_add(): except ValueError: return render_template("error.htm", error="Il campo Inventario ente deve contenere un numero.") nuovodisp = Dispositivo(request.form['tipo'], request.form['marca'], request.form['modello'], - int(request.form['inv_ced']), int(request.form['inv_ente']), request.form['fornitore'], - request.form['rete'], request.form['seriale'], request.form['ip']) + int(request.form['inv_ced']) if request.form['inv_ced'] else None, + int(request.form['inv_ente']) if request.form['inv_ente'] else None, + request.form['fornitore'], request.form['rete'], request.form['seriale'], + request.form['ip']) db.session.add(nuovodisp) db.session.commit() # Trova tutti gli utenti, edizione sporco hack in html