Skip to content

Commit

Permalink
Parse datasource_id as integer on the server side (apache#6359)
Browse files Browse the repository at this point in the history
- Datasource ids are being serialized into strings on the client side and python's default json.load doesn't deserialize strings representing integers as integers. Adding an integer parsing step when initializing QueryContext.
  • Loading branch information
xtinec authored and bipinsoniguavus committed Dec 24, 2018
1 parent 4ce3610 commit 8a0d279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/common/query_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(
queries: List[Dict],
):
self.datasource = ConnectorRegistry.get_datasource(datasource.get('type'),
datasource.get('id'),
int(datasource.get('id')),
db.session)
self.queries = list(map(lambda query_obj: QueryObject(**query_obj), queries))

Expand Down

0 comments on commit 8a0d279

Please sign in to comment.