Skip to content

Commit

Permalink
dm_expstorage #fetch_root cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Aug 30, 2009
1 parent 97bdc8c commit 421d1d7
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/openwfe/extras/expool/dm_expstorage.rb
Expand Up @@ -206,17 +206,14 @@ def find_expressions (options={})
#
def fetch_root (wfid)

exps = DataMapper.repository(@dm_repository) {
e = DataMapper.repository(@dm_repository) {

DmExpression.all(
:wfid => wfid,
:expclass => OpenWFE::DefineExpression.to_s,
:order => [ :expid.asc ])
DmExpression.first(
:wfid => wfid,
:expclass => OpenWFE::DefineExpression.to_s,
:order => [ :expid.asc ])
}

#e = exps.sort { |fe1, fe2| fe1.fei.expid <=> fe2.fei.expid }[0]
e = exps.first

e ? e.as_owfe_expression(self.application_context) : nil
end

Expand Down

0 comments on commit 421d1d7

Please sign in to comment.