Skip to content

Commit

Permalink
#167 - Use boolean property for isShareableWithGBIF flag
Browse files Browse the repository at this point in the history
  • Loading branch information
patkyn committed Aug 6, 2020
1 parent 2ecab32 commit 40a9d30
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions grails-app/services/au/org/ala/collectory/CrudService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class CrudService {
'filed','publicArchiveAvailable','contentTypes','defaultDarwinCoreValues', 'imageMetadata',
'geographicDescription','northBoundingCoordinate','southBoundingCoordinate','eastBoundingCoordinate',
'westBoundingCoordinate','beginDate','endDate','qualityControlDescription','methodStepDescription',
'gbifDoi', 'isShareableWithGBIF'
'gbifDoi'
]
static dataResourceNumberProperties = ['harvestFrequency','downloadLimit']
static dataResourceTimestampProperties = ['lastChecked','dataCurrency']
static dataResourceBooleanProperties = ['gbifDataset']
static dataResourceBooleanProperties = ['gbifDataset', 'isShareableWithGBIF']
static dataResourceJSONArrays = ['connectionParameters', 'contentTypes', 'defaultDarwinCoreValues', 'imageMetadata']
//static dataResourceObjectProperties = ['dataProvider']

Expand Down Expand Up @@ -414,12 +414,7 @@ class CrudService {

dataResourceStringProperties.each {
if (obj.has(it)) {
if (dr."${it}" instanceof Boolean && obj."${it}" instanceof Boolean) {
dr."${it}" = obj."${it}"
} else {
dr."${it}" = obj."${it}".toString()
}

dr."${it}" = obj."${it}".toString()
}
}

Expand Down

0 comments on commit 40a9d30

Please sign in to comment.