Changeset 410


Ignore:
Timestamp:
May 11, 2010, 4:51:06 PM (14 years ago)
Author:
keesvb
Message:

another obvious bugfix in fieldExists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy

    r409 r410  
    300300                try {
    301301                        TemplateField field = getField(this.giveFields(),fieldName)
    302                 }
    303                 // so return false in that case
     302                        // return true if exception is not thrown (but double check if field really is not null)
     303                        if (field) {
     304                                return true
     305                        }
     306                        else {
     307                                return false
     308                        }
     309                }
     310                // if exception is thrown, return false
    304311                catch(NoSuchFieldException e) {
    305                         return false
    306                 }
    307                 // otherwise, return true (but double check if field really is not null)
    308                 if (field) {
    309                         return true
    310                 }
    311                 else {
    312312                        return false
    313313                }
Note: See TracChangeset for help on using the changeset viewer.