GAE references, thanks Christian

This commit is contained in:
mdipierro
2012-06-16 16:49:06 -05:00
parent 2877daa369
commit 7b6f5dff48
3 changed files with 15 additions and 7 deletions
+2 -2
View File
@@ -2271,7 +2271,7 @@ class SQLTABLE(TABLE):
except TypeError:
href = '%s/%s/%s' % (linkto, tablename, r_old)
r = A(r, _href=href)
elif field.type.startswith('reference'):
elif isinstance(field.type, str) and field.type.startswith('reference'):
if linkto:
ref = field.type[10:]
try:
@@ -2294,7 +2294,7 @@ class SQLTABLE(TABLE):
(k, record[tablename][k])) or (k, record[k]) \
for k in field._table._primarykey ] ))
r = A(r, _href='%s/%s?%s' % (linkto, tablename, key))
elif field.type.startswith('list:'):
elif isinstance(field.type, str) and field.type.startswith('list:'):
r = represent(field,r or [],record)
elif field.represent:
r = represent(field,r,record)