Changeset 1272

Show
Ignore:
Timestamp:
15-12-10 13:44:27 (3 years ago)
Author:
robert@…
Message:

Trying to solve a bug that only appears on ci, not locally, in importing templates (ticket #76)

Location:
trunk/grails-app
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/TemplateController.groovy

    r1270 r1272  
    7979                                templates << templateData 
    8080                        } catch (Exception e) { 
    81                                 templates << [ template: null, error: "Template " + ( template.name ?: " without name" ) + " could not be parsed: " + e ]; 
     81                                templates << [ template: null, error: "Template " + ( template.name ?: " without name" ) + " could not be parsed: " + e + " (" + e. getStackTrace()[ 0 ] + ")" ]; 
    8282                        } 
    8383                } 
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateField.groovy

    r1271 r1272  
    475475                xmlObject.listItems?.listItem.each { 
    476476                        def name = "" 
    477                         if( it && it.name ) 
     477                        if( it != null && it.name ) 
    478478                                name = it.name.text() 
    479479 
  • trunk/grails-app/domain/dbnp/studycapturing/Template.groovy

    r1269 r1272  
    301301                        // template fields with the same name, in order to have as little comparisons 
    302302                        // as possible 
    303                         for( def otherField in TemplateField.findAllByName( field.name ) ) { 
     303                        for( def otherField in TemplateField.findAllByName( field?.name ) ) { 
    304304                                if( field.contentEquals( otherField ) ) { 
    305305                                        field = otherField;