Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

except Permission denied db exception #380

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions explorer/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ def build_schema_info(connection_alias):
if not _include_table(table_name):
continue
td = []
table_description = connection.introspection.get_table_description(cursor, table_name)
for row in table_description:
column_name = row[0]
try:
field_type = connection.introspection.get_field_type(row[1], row)
except KeyError as e:
field_type = 'Unknown'
td.append((column_name, field_type))
try:
table_description = connection.introspection.get_table_description(cursor, table_name)
for row in table_description:
column_name = row[0]
try:
field_type = connection.introspection.get_field_type(row[1], row)
except KeyError as e:
field_type = 'Unknown'
td.append((column_name, field_type))
except Exception as e:
# td.append(('Permission denied', 'Unknown'))
continue
ret.append((table_name, td))
return ret

Expand Down