Skip to content

Commit 0cfa686

Browse files
cmdcolinclaude
andcommitted
Fix render [:] as JSON crash in deleteOrganismFeatures
The inline map literal [:] in render [:] as JSON causes a MissingPropertyException when executed inside the transactional template generated by the class-level @transactional annotation. Use a JSONObject variable instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aa918ab commit 0cfa686

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

grails-app/controllers/org/bbop/apollo/OrganismController.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ class OrganismController {
200200
log.info "Deleted ${deleted} features for organism ${organism.commonName}"
201201
}
202202

203-
render [:] as JSON
203+
def result = new JSONObject()
204+
render result as JSON
204205
}
205206
catch (Exception e) {
206207
def error = [error: 'problem removing organism features for organism: ' + e]

0 commit comments

Comments
 (0)