Merge pull request #1016 from ShySec/master
fix Field.Virtual use in multi-table queries
This commit is contained in:
+4
-1
@@ -2681,7 +2681,10 @@ class SQLFORM(FORM):
|
||||
continue
|
||||
if field.type == 'blob':
|
||||
continue
|
||||
value = row[str(field)]
|
||||
if isinstance(field, Field.Virtual) and field.tablename in row:
|
||||
value = dbset.db[field.tablename][row[field.tablename][field_id]][field.name]
|
||||
else:
|
||||
value = row[str(field)]
|
||||
maxlength = maxtextlengths.get(str(field), maxtextlength)
|
||||
if field.represent:
|
||||
if field.type.startswith('reference'):
|
||||
|
||||
Reference in New Issue
Block a user