Skip to content

Commit

Permalink
Fixes output schema variable name. Without this the sorted cache is n…
Browse files Browse the repository at this point in the history
…ever returned!

   ____  ____  ____  _____
  / __ \/ __ \/ __ \/ ___/
 / /_/ / /_/ / /_/ (__  )
 \____/\____/ .___/____/
           /_/
  • Loading branch information
susodapop committed Jan 29, 2020
1 parent 9c5dd99 commit a31f901
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions redash/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ def get_schema(self, refresh=False):
"Error sorting schema columns for data_source {}".format(self.id)
)
out_schema = schema

redis_connection.set(self._schema_key, json_dumps(out_schema))
finally:
redis_connection.set(self._schema_key, json_dumps(out_schema))
else:
schema = json_loads(cache)
out_schema = json_loads(cache)

return schema
return out_schema

def _sort_schema(self, schema):
return [
Expand Down

0 comments on commit a31f901

Please sign in to comment.