Beispiel #1
0
def delProject():
    c = Columns.query.filter_by(id = int(request.form['idProject'])).all()
    for d in c:
        ca = Cards.query.filter_by(column_id = d.id).all()
        for card in ca:
            a.delCard(session['author_id'], session['session_id'], card.id, card.column_id, card.project_id)
        a.delColumn(session['author_id'], session['session_id'], d.id, d.project_id)
    a.delProject(session['author_id'], session['session_id'], int(request.form['idProject']))
    return "OK"
Beispiel #2
0
def delColumn():
    c = Columns.query.filter_by(id = int(request.form['idColumn'])).all()
    if not c:
        return "OK"
    c = c[0]
    ca = Cards.query.filter_by(column_id = c.id).all()
    for card in ca:
        a.delCard(session['author_id'], session['session_id'], card.id, card.column_id, card.project_id)
    a.delColumn(session['author_id'], session['session_id'], int(request.form['idColumn']), c.project_id)
    return "OK"