Skip to content
Snippets Groups Projects
Commit 0021ee4a authored by srosse's avatar srosse
Browse files

OO-4512: get a single manageable organisation to create the resource

parent d602402d
No related branches found
No related tags found
No related merge requests found
...@@ -245,6 +245,8 @@ public class CreateRepositoryEntryController extends FormBasicController impleme ...@@ -245,6 +245,8 @@ public class CreateRepositoryEntryController extends FormBasicController impleme
if(organisationEl.isVisible() && organisationEl.isOneSelected()) { if(organisationEl.isVisible() && organisationEl.isOneSelected()) {
Long organisationKey = Long.valueOf(organisationEl.getSelectedKey()); Long organisationKey = Long.valueOf(organisationEl.getSelectedKey());
organisation = organisationService.getOrganisation(new OrganisationRefImpl(organisationKey)); organisation = organisationService.getOrganisation(new OrganisationRefImpl(organisationKey));
} else if(manageableOrganisations.size() == 1) {
organisation = organisationService.getOrganisation(manageableOrganisations.get(0));
} else { } else {
organisation = organisationService.getDefaultOrganisation(); organisation = organisationService.getDefaultOrganisation();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment