Skip to content

Commit

Permalink
Fixed a bug with default sort, if no mapping closure is specified on …
Browse files Browse the repository at this point in the history
…the domain object.
  • Loading branch information
Steve Krenek committed Mar 5, 2011
1 parent 35ac2c2 commit 193f0f3
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -115,8 +115,12 @@ class FilterPaneService {
}
}
}

def defaultSort = filterClass?.mapping?.mapping?.sort
def defaultSort = null
try {
defaultSort = filterClass?.mapping?.mapping?.sort
} catch (Exception ex) {
log.info("No mapping property found on filterClass ${filterClass}")
}
if (params.sort) {
if (params.sort.indexOf('.') < 0) { // if not an association..
order(params.sort, params.order ?: 'asc' )
Expand Down

0 comments on commit 193f0f3

Please sign in to comment.