Skip to content

Commit

Permalink
Change the way to get the default location
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoshidajp committed Jul 25, 2018
1 parent bd1c5fa commit 5ca59a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions redash/query_runner/big_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def configuration_schema(cls):
},
'location': {
"type": "string",
'title': 'Processing Location (default: US)',
"title": "Processing Location",
"default": "US",
},
'loadSchema': {
"type": "boolean",
Expand Down Expand Up @@ -156,8 +157,7 @@ def _get_project_id(self):
return self.configuration["projectId"]

def _get_location(self):
location = self.configuration.get("location", "")
return "US" if location == "" else location
return self.configuration.get("location", "US")

def _get_total_bytes_processed(self, jobs, query):
job_data = {
Expand Down Expand Up @@ -318,7 +318,8 @@ def configuration_schema(cls):
},
'location': {
"type": "string",
'title': 'Processing Location (default: US)',
"title": "Processing Location",
"default": "US",
},
'loadSchema': {
"type": "boolean",
Expand Down

0 comments on commit 5ca59a5

Please sign in to comment.