Skip to content

Commit 9458a7c

Browse files
committed
Disable org collectory sync by default #2382
1 parent 232113b commit 9458a7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grails-app/services/au/org/ala/ecodata/OrganisationService.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class OrganisationService implements DataBinder {
4646
return Organisation.findAllByStatusNotEqual(DELETED).collect{toMap(it, levelOfDetail)}
4747
}
4848

49-
def create(Map props, boolean createInCollectory = true) {
49+
def create(Map props, boolean createInCollectory = false) {
5050

5151
def organisation = new Organisation(organisationId: Identifiers.getNew(true, ''), name:props.name)
5252

@@ -90,7 +90,7 @@ class OrganisationService implements DataBinder {
9090
return institutionId
9191
}
9292

93-
def update(String id, props) {
93+
def update(String id, props, boolean createInCollectory = false) {
9494

9595
def organisation = Organisation.findByOrganisationId(id)
9696
if (organisation) {
@@ -99,7 +99,7 @@ class OrganisationService implements DataBinder {
9999
// if no collectory institution exists for this organisation, create one
100100
// We shouldn't be doing this unless the org is attached to a project that exports data
101101
// to the ALA.
102-
if (!organisation.collectoryInstitutionId || organisation.collectoryInstitutionId == 'null' || organisation.collectoryInstitutionId == '') {
102+
if (createInCollectory && (!organisation.collectoryInstitutionId || organisation.collectoryInstitutionId == 'null' || organisation.collectoryInstitutionId == '')) {
103103
organisation.collectoryInstitutionId = createCollectoryInstitution(props)
104104
}
105105
œ

0 commit comments

Comments
 (0)