def staff_org_site_json():
 table = s3db.hrm_human_resource
 otable = s3db.org_organisation
 query = ((table.person_id == request.args[0]) & (table.organisation_id == otable.id))
 records = db(query).select(table.site_id, otable.id, otable.name)
 response.headers['Content-Type'] = 'application/json'
 return records.json()

def staff_org_site_json ( ) : table = s3db . hrm_human_resource otable = s3db . org_organisation query = ( ( table . person_id == request . args [ 0 ] ) & ( table . organisation_id == otable . id ) ) records = db ( query ) . select ( table . site_id , otable . id , otable . name ) response . headers [ 'Content-Type' ] = 'application/json' return records . json ( )
used by the asset - assign to person page .