Fix getting field type
authorJavier Sancho <jsf@jsancho.org>
Wed, 4 Nov 2020 16:52:02 +0000 (17:52 +0100)
committerJavier Sancho <jsf@jsancho.org>
Wed, 4 Nov 2020 16:52:02 +0000 (17:52 +0100)
datasette_pytables/__init__.py

index 889dcca..1cb22a8 100644 (file)
@@ -277,7 +277,7 @@ class PyTablesConnector(dc.Connector):
                         row['count(*)'] = int(table.nrows)
                     elif field_name.get('json_type'):
                         field_name = field_name.get('json_type')
-                        row['json_type(' + field_name + ')'] = _get_field_type(field)
+                        row['json_type(' + field_name + ')'] = _get_field_type(field_name)
                     else:
                         raise Exception("Function not recognized")
                 else: