Skip to content

Commit

Permalink
Merge pull request #2512 from MoffMade/fix-2511
Browse files Browse the repository at this point in the history
add returnAllOrganisms to updateOrganismWithInfo
  • Loading branch information
MoffMade committed Sep 2, 2020
2 parents f27376b + 545363f commit baa5ab7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ class OrganismController {
, @RestApiParam(name = "metadata", type = "string", paramType = RestApiParamType.QUERY, description = "organism metadata")
, @RestApiParam(name = "organismData", type = "file", paramType = RestApiParamType.QUERY, description = "zip or tar.gz compressed data directory (if other options not used). Blat data should include a .2bit suffix and be in a directory 'searchDatabaseData'")
, @RestApiParam(name = "noReloadSequences", type = "boolean", paramType = RestApiParamType.QUERY, description = "(default false) If set to true, then sequences will not be reloaded if the organism directory changes.")
, @RestApiParam(name = "returnAllOrganisms", type = "boolean", paramType = RestApiParamType.QUERY, description = "(optional) Return all organisms (true / false) (default true)")
])
@Transactional
def updateOrganismInfo() {
Expand Down Expand Up @@ -1349,7 +1350,10 @@ class OrganismController {
} else {
throw new Exception('organism not found')
}
findAllOrganisms()

Boolean returnAllOrganisms = organismJson.returnAllOrganisms!=null ? Boolean.valueOf(organismJson.returnAllOrganisms) : true
render returnAllOrganisms ? findAllOrganisms() : new JSONArray()

}
catch (e) {
def error = [error: 'problem saving organism: ' + e]
Expand Down

0 comments on commit baa5ab7

Please sign in to comment.