'Ondelete callback for work assignments
@param row: the Row'

@classmethod
def assignment_ondelete(cls, row):

    try:
        record_id = row.id
    except AttributeError:
        return
    db = current.db
    atable = current.s3db.work_assignment
    row = db((atable.id == record_id)).select(atable.deleted_fk, limitby=(0, 1)).first()
    if (row and row.deleted_fk):
        data = json.loads(row.deleted_fk)
        job_id = data.get('job_id')
        if job_id:
            cls.update_workers_assigned(job_id)
    return
