]> git.jsancho.org Git - datasette-pytables.git/commitdiff
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 889dccadbf9f4ad453022e9c7d6c5acdfa3bd430..1cb22a8c2b03f379fa7d9226040abd51c0469197 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: