From 5dd452554e2920e61b70f8381e2dd5ccf834d764 Mon Sep 17 00:00:00 2001 From: Tim Richardson Date: Fri, 21 Jun 2013 03:21:13 +1000 Subject: [PATCH] allow compute fields to depend on compute fields defined earlier --- gluon/dal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gluon/dal.py b/gluon/dal.py index 7d0190aa..194413a4 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -8542,6 +8542,8 @@ class Table(object): # try compute it try: new_fields[name] = (ofield,ofield.compute(row)) + __,fields[name] = new_fields[name] #the value is the second element of the tuple + row = Row(fields) #allow later compute fields to refer to this value except (KeyError, AttributeError): # error sinlently unless field is required! if ofield.required: