fixed issue 1160, show button for linked tables even if referenced column is not readable

This commit is contained in:
mdipierro
2012-11-14 15:00:04 -06:00
parent f90d871fb6
commit 0f2df1b46c
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.2.1 (2012-11-14 14:12:26) stable
Version 2.2.1 (2012-11-14 14:59:57) stable
+2
View File
@@ -150,6 +150,8 @@ class WebClient(object):
match = self.session_regex.match(cookie)
if match:
name = match.group('name')
print repr(cookie)
print name, self.sessions.get(name,None), value
if name in self.sessions and self.sessions[name] != value:
raise RuntimeError('Broken sessions %s' % name)
self.sessions[name] = value
+2 -3
View File
@@ -2436,9 +2436,8 @@ class SQLFORM(FORM):
check = {}
id_field_name = table._id.name
for rfield in table._referenced_by:
if rfield.readable:
check[rfield.tablename] = \
check.get(rfield.tablename, []) + [rfield.name]
check[rfield.tablename] = \
check.get(rfield.tablename, []) + [rfield.name]
if isinstance(linked_tables, dict):
linked_tables = linked_tables.get(table._tablename, [])
for tablename in sorted(check):