'Update the number of workers assigned to a job
@param job_id: the job record id'

@staticmethod
def update_workers_assigned(job_id):

    if (not job_id):
        return
    db = current.db
    s3db = current.s3db
    jtable = s3db.work_job
    atable = s3db.work_assignment
    query = ((atable.job_id == job_id) & (atable.deleted != True))
    count = atable.id.count()
    row = db(query).select(count, limitby=(0, 1)).first()
    if (not row):
        workers_assigned = 0
    else:
        workers_assigned = row[count]
    db((jtable.id == job_id)).update(workers_assigned=workers_assigned, modified_by=jtable.modified_by, modified_on=jtable.modified_on)
    return
