lib/openwfe/expressions/flowexpression.rb in openwferu-0.9.3 vs lib/openwfe/expressions/flowexpression.rb in openwferu-0.9.4
- old
+ new
@@ -252,18 +252,20 @@
# variable substitution.
# It's ok to pass a Symbol for the attribute name.
#
def lookup_attribute (attname, workitem, default=nil)
- #attname = attname.to_s
attname = symbol_to_attname(attname) \
if attname.kind_of? Symbol
#ldebug { "lookup_attribute() '#{attname}' in #{@fei.to_debug_s}" }
text = @attributes[attname]
+ default = default.to_s if default
+
return default if not text
+
return OpenWFE::dosub(text, self, workitem)
end
#
# A convenience method for looking up a boolean value.