Could use filter_by here: `User.query.filter_by(username=username).first()`