'Not working'

@staticmethod
def commit_person_onaccept(form):

    db = current.db
    s3db = current.s3db
    table = db.req_commit_person
    rstable = s3db.req_req_skill
    req_skill_id = 0
    if form:
        req_skill_id = form.vars.get('req_skill_id', None)
    if (not req_skill_id):
        commit_skill_id = s3_get_last_record_id('req_commit_skill')
        r_commit_skill = table[commit_skill_id]
        req_skill_id = r_commit_skill.req_skill_id
    query = ((table.req_skill_id == req_skill_id) & (table.deleted == False))
    commit_skills = db(query).select(table.quantity)
    quantity_commit = 0
    for commit_skill in commit_skills:
        quantity_commit += commit_skill.quantity
    r_req_skill = db.req_req_skill[req_skill_id]
    rstable[req_skill_id] = dict(quantity_commit=quantity_commit)
    s3_store_last_record_id('req_req_skill', r_req_skill.id)
    req_skill_onaccept(None)
