()
return jsonify({'msg': '删除成功', 'status': 1})
删除任务信息
删除任务信息
删除任务信息
def del_task():
    """ 删除任务信息 """
    data = request.json
    ids = data.get('id')
    _edit = Task.query.filter_by(id=ids).first()
    if _edit.status != '创建':
        return jsonify({'msg': '请先移除任务', 'status': 0})

    db.session.delete(_edit)
    db.session.commit()
    return jsonify({'msg': '删除成功', 'status': 1})
def del_task ( ) : data = request . json ids = data . get ( 'id' ) _edit = Task . query . filter_by ( id = ids ) . first ( ) if _edit . status != '创建': return jsonify ( { 'msg' : '请先移除任务', 'status':  0 ) db . session . delete ( _edit ) db . session . commit ( ) return jsonify ( { 'msg' : '删除成功', 'statu s : 1})