Add attributes sortable on fields_get for issue197
This commit is contained in:
1 parent
271ba1118e
commit
fc2e8b3165
1 file changed
+3
@@ -1913,6 +1913,9 @@ class ORM(object):
|
||||
if hasattr(self._columns[field], arg) \
|
||||
and getattr(self._columns[field], arg):
|
||||
res[field][arg] = getattr(self._columns[field], arg)
|
||||
if isinstance(self._columns[field], fields.Function) \
|
||||
and not self._columns[field].order_field:
|
||||
res[field]['sortable'] = False
|
||||
|
||||
# translate the field label
|
||||
res_trans = translation_obj._get_source(cursor,
|
||||
|
||||
Reference in new issue
Block a user