def delete_vote(table, vote, id): v_id = input("Please input id of the one you want to delete:") if table == 'post': if vote == 'up': pu.delete(v_id) else: pd.delete(v_id) show_votes('post', id) else: if vote == 'up': cu.delete(v_id) else: cd.delete(v_id) show_comment(id)
def delete_vote(table, vote, id): logging.info("delete_vote request user response: Please input id of the one you want to delete\n") v_id = input("Please input id of the one you want to delete:") logging.info("Response: ") logging.info(v_id) logging.info("\n") if table == 'post': if vote == 'up': pu.delete(v_id) else: pd.delete(v_id) show_votes('post', id) else: if vote == 'up': cu.delete(v_id) else: cd.delete(v_id) show_comment(id)