From b9182bccdc4e28defaba48cfe1a5dae86caae075 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 18 Sep 2008 11:34:22 -0400 Subject: If a value expression lookup on an account object fails, defer to the current session object. Transactions and entries already do this. --- src/account.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/account.cc b/src/account.cc index 5f131fe1..f628817e 100644 --- a/src/account.cc +++ b/src/account.cc @@ -189,7 +189,9 @@ expr_t::ptr_op_t account_t::lookup(const string& name) return WRAP_FUNCTOR(get_wrapper<&get_total>); break; } - return expr_t::ptr_op_t(); + + assert(owner == session_t::current); + return owner->current_report->lookup(name); } bool account_t::valid() const -- cgit v1.2.3