コード例 #1
0
    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
コード例 #2
0
    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
コード例 #3
0
ファイル: test_case.py プロジェクト: lukasgraf/opengever.core
 def get_org_unit(self):
     return OrgUnit.get(self._org_unit_id)
コード例 #4
0
 def get_org_unit(self):
     return OrgUnit.get(self._org_unit_id)