[sqlalchemy] Handle when column metadata if of Column type
Happens with PostgreSQL
@@ -313,7 +313,7 @@ class SqlAlchemyApi(Api):
]
elif metadata:
response['full_headers'] = [{
- 'name': col[0] if type(col) is dict or type(col) is tuple else col,
+ 'name': col[0] if type(col) is dict or type(col) is tuple else col.name if hasattr(col, 'name') else col,
'type': 'STRING_TYPE',
'comment': ''
} for col in metadata
