Skip to content

Commit

Permalink
[hotfix] casting db_id to int
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 8, 2017
1 parent ddeabdd commit 9691234
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ def activity_per_day(self):
@has_access_api
@expose("/schemas/<db_id>/")
def schemas(self, db_id):
db_id = int(db_id)
database = (
db.session
.query(models.Database)
Expand All @@ -1214,6 +1215,7 @@ def schemas(self, db_id):
@expose("/tables/<db_id>/<schema>/<substr>/")
def tables(self, db_id, schema, substr):
"""Endpoint to fetch the list of tables for given database"""
db_id = int(db_id)
schema = utils.js_string_to_python(schema)
substr = utils.js_string_to_python(substr)
database = db.session.query(models.Database).filter_by(id=db_id).one()
Expand Down

0 comments on commit 9691234

Please sign in to comment.