Changeset 271


Ignore:
Timestamp:
Mar 16, 2010, 9:21:46 AM (13 years ago)
Author:
jahn
Message:

Cleaned up getTerm() function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/data/Term.groovy

    r267 r271  
    2929        // Covenenice method for delivering Terms.
    3030        // if the term is already defined, use it.
    31         // otherwise, create it.
     31        // otherwise, create it and return it.
    3232        // should be removed when ontologies work.
    3333        static getTerm( string ) {
     
    3737                    term.ontology = Ontology.find('from Ontology as o')
    3838                    term.accession = ''
    39                     println string
    40                     if( term.save(flush:true) ) { println "okay, saved" }
    41                     else {
     39                    if( !term.save(flush:true) )  {
    4240                            term.errors.each{ println it }
    43                             println "not okay, not saved" }
     41                    }
    4442            }
    4543            return term
Note: See TracChangeset for help on using the changeset viewer.