My flask project is getting a TypeError: ‘Undefined’ object cannot be interpreted as an integer

Here is the code that is causing the error : symbol = request.form.get(“symbol”) shares = request.form.get(“shares”) symbolrow = db.execute(“SELECT * FROM owned WHERE user = :user”, user = user) for symbols in symbolrow: if str(symbols[‘symbol’]) == str(symbol): if int(symbols[‘shares’]) < shares: return apology(“not enough shares”, 403) elif shares < 1: return apology(“you must enter a…

Details