'Prevent the same human_resource record being added more than once'

@staticmethod
def project_human_resource_onvalidation(form):

    hr = current.s3db.project_human_resource_project
    form_vars = form.request_vars
    query = (((hr.human_resource_id == form_vars.human_resource_id) & (hr.project_id == form_vars.project_id)) & (hr.id != form_vars.id))
    row = current.db(query).select(hr.id, limitby=(0, 1)).first()
    if row:
        form.errors.human_resource_id = current.T('Record    already    exists')
