Skip to content

Commit

Permalink
Disable org collectory sync by default #2382
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Sep 16, 2024
1 parent 232113b commit 9458a7c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class OrganisationService implements DataBinder {
return Organisation.findAllByStatusNotEqual(DELETED).collect{toMap(it, levelOfDetail)}
}

def create(Map props, boolean createInCollectory = true) {
def create(Map props, boolean createInCollectory = false) {

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

Expand Down Expand Up @@ -90,7 +90,7 @@ class OrganisationService implements DataBinder {
return institutionId
}

def update(String id, props) {
def update(String id, props, boolean createInCollectory = false) {

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

0 comments on commit 9458a7c

Please sign in to comment.