def disable_additional_org_units(self, org_unit_ids=None): if org_unit_ids is None: org_unit_ids = ('rk',) current_ou = get_current_org_unit() if current_ou in org_unit_ids: raise ValueError for ou_id in org_unit_ids: ou = OrgUnit.get(ou_id) create_session().delete(ou) current_ou._chosen_strategy = None
def get_org_unit(self): return OrgUnit.get(self._org_unit_id)