fixed a problem with computed fields

This commit is contained in:
mdipierro committed 2012-07-14 18:24:01 -05:00
1 parent 37806c88a7
commit a508e9f8ab
3 files changed
+11 -15

No files matched your search

+2 -5
View File
@@ -7396,11 +7396,8 @@ class Table(dict):
elif update and not ofield.update is None:
new_fields.append((ofield,ofield.update))
for ofield in self:
if not ofield.name in new_fields_names and ofield.compute:
try:
new_fields.append((ofield,ofield.compute(Row(fields))))
except KeyError:
pass
if ofield.compute:
new_fields.append((ofield,ofield.compute(Row(fields))))
if not update and ofield.required and not ofield.name in new_fields_names:
raise SyntaxError,'Table: missing required field: %s' % ofield.name
return new_fields