'* Update Affiliation and Realms
* Process injected fields'

@staticmethod
def org_office_onaccept(form):

    form_vars = form.vars
    org_update_affiliations('org_office', form_vars)
    if current.deployment_settings.get_org_summary():
        db = current.db
        id = form_vars.id
        table = current.s3db.org_office_summary
        query = (table.office_id == id)
        existing = db(query).select(table.id, limitby=(0, 1)).first()
        post_vars = current.request.post_vars
        national_staff = post_vars.get('national_staff', None)
        international_staff = post_vars.get('international_staff', None)
        if existing:
            db(query).update(national_staff=national_staff, international_staff=international_staff)
        elif (national_staff or international_staff):
            table.insert(office_id=id, national_staff=national_staff, international_staff=international_staff)
