Ignore:
Timestamp:
Apr 5, 2012, 8:20:34 PM (10 years ago)
Author:
work@…
Message:
  • added testing versions of

getEventsForStudy
getSamplingEventsForStudy
getEventGroupsForStudy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/api/ApiService.groovy

    r2212 r2215  
    107107        // iterate through elements
    108108        elements.each {
    109             def fields  = it.giveFields()
     109            def fields  = (it.respondsTo('giveFields')) ? it.giveFields(): []
    110110            def item    = [:]
     111
     112            // check if element has a name
     113            ['name','description'].each { checkName ->
     114                if (it.hasProperty(checkName)) item[checkName] = it[checkName]
     115            }
    111116
    112117            // add token
Note: See TracChangeset for help on using the changeset viewer.