File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
grails-app/services/au/org/ala/ecodata Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class OrganisationService implements DataBinder {
46
46
return Organisation . findAllByStatusNotEqual(DELETED ). collect{toMap(it, levelOfDetail)}
47
47
}
48
48
49
- def create (Map props , boolean createInCollectory = true ) {
49
+ def create (Map props , boolean createInCollectory = false ) {
50
50
51
51
def organisation = new Organisation (organisationId : Identifiers . getNew(true , ' ' ), name :props. name)
52
52
@@ -90,7 +90,7 @@ class OrganisationService implements DataBinder {
90
90
return institutionId
91
91
}
92
92
93
- def update (String id , props ) {
93
+ def update (String id , props , boolean createInCollectory = false ) {
94
94
95
95
def organisation = Organisation . findByOrganisationId(id)
96
96
if (organisation) {
@@ -99,7 +99,7 @@ class OrganisationService implements DataBinder {
99
99
// if no collectory institution exists for this organisation, create one
100
100
// We shouldn't be doing this unless the org is attached to a project that exports data
101
101
// to the ALA.
102
- if (! organisation. collectoryInstitutionId || organisation. collectoryInstitutionId == ' null' || organisation. collectoryInstitutionId == ' ' ) {
102
+ if (createInCollectory && ( ! organisation. collectoryInstitutionId || organisation. collectoryInstitutionId == ' null' || organisation. collectoryInstitutionId == ' ' ) ) {
103
103
organisation. collectoryInstitutionId = createCollectoryInstitution(props)
104
104
}
105
105
œ
You can’t perform that action at this time.
0 commit comments