- Timestamp:
- Jan 28, 2011, 12:30:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/nl/tno/metagenomics/RunController.groovy
r7 r9 31 31 32 32 // Send the assay information to the view 33 [run: run, otherAssays: otherAssays, editable: true]33 [run: run, allRuns: Run.list(), otherAssays: otherAssays, editable: true] 34 34 } 35 35 … … 45 45 return 46 46 } 47 48 Assay assay = getAssay( params.id ) 49 50 if( !assay ) { 51 render flash.error; 52 return 47 48 Assay assay = null 49 if( params.assayId ) { 50 assay = getAssay( params.assayId ) 51 52 if( !assay ) { 53 render flash.error; 54 return 55 } 53 56 } 54 57 … … 81 84 82 85 def update = { 83 if( !params.assayId ) {84 flash.error = "No assay id given"85 redirect(controller: 'study')86 return87 }88 89 Assay assay = getAssay(params.assayId);90 91 if( !a ) {92 redirect( controller: 'study' );93 }94 95 86 Run run = getRun( params.id ); 96 87 … … 102 93 // Set properties to the run 103 94 params.parameterFile = params.editParameterFile 95 96 println "Edit run: " + params 104 97 run.setPropertiesFromForm( params ); 105 98 … … 109 102 flash.error = "Run could not be saved: " + run.getErrors(); 110 103 } 111 112 redirect( controller: 'assay', action: 'show', id: params.assayId) 104 105 Assay assay = getAssay(params.assayId); 106 flash.error = ""; 107 108 if( assay ) { 109 redirect( controller: 'assay', action: 'show', id: assay.id) 110 } else { 111 redirect( controller: 'run', action: 'show', id: run.id ) 112 } 113 113 } 114 114 … … 286 286 def assaySampleParams = sampleParams.get( assaySample.id as String ); 287 287 if( assaySampleParams ) { 288 assaySample.tagName = assaySampleParams.tagName 288 289 assaySample.oligoNumber = assaySampleParams.oligoNumber 289 290 assaySample.tagSequence = assaySampleParams.tagSequence
Note: See TracChangeset
for help on using the changeset viewer.