old_vote = query(poll_user_id=session['poll_user_id'], poll=poll_id)
if not old_vote:
    insert(poll_user_id=session['poll_user_id'], poll=poll_id, choice=form.
        choice)
else:
    update(poll_user_id=session['poll_user_id'], poll=poll_id, choice=form.
        choice)
flask save polls in cookie