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

Allow Query.options to be None #6519

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion redash/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def update_group_permission(self, group, view_only):

@property
def uses_ssh_tunnel(self):
return "ssh_tunnel" in self.options
return self.options and "ssh_tunnel" in self.options

@property
def query_runner(self):
Expand Down
4 changes: 2 additions & 2 deletions viz-lib/src/visualizations/counter/Renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ function getCounterStyles(scale: any) {
function getCounterScale(container: any) {
// size of font in base container
// children use a relative font size (em)
if (container.closest('.visualization-preview')) {
if (container.closest('.visualization-preview') || container.closest('.ant-tabs-tabpane')) {
return "60";
}
const fontSize = container.clientHeight / 4.5;
return fontSize > 60 ? "60" : fontSize < 12 ? "12" : fontSize.toFixed();
return fontSize > 60 ? "60" : fontSize < 14 ? "14" : fontSize.toFixed();
}

export default function Renderer({ data, options, visualizationName }: any) {
Expand Down
Loading