compted fields visible in SQLFORM(readonly=True)

This commit is contained in:
mdipierro
2012-09-06 08:59:11 -05:00
parent d8ba67e2e3
commit a8bc251a94
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.7 (2012-09-06 08:41:19) stable
Version 2.0.7 (2012-09-06 08:59:06) stable
+3 -2
View File
@@ -874,8 +874,9 @@ class SQLFORM(FORM):
# if no fields are provided, build it from the provided table
# will only use writable or readable fields, unless forced to ignore
if fields is None:
fields = [f.name for f in table if (
ignore_rw or f.writable or f.readable) and not f.compute]
fields = [f.name for f in table if
(ignore_rw or f.writable or f.readable) and
(readonly or not f.compute)]
self.fields = fields
# make sure we have an id