Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix: unset row_limit when it's not a number (#387)
Browse files Browse the repository at this point in the history
* fix: unset row_limit when it's not a number

* fix: address comments
  • Loading branch information
Erik Ritter committed Apr 22, 2020
1 parent a95301f commit 98b6117
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/superset-ui-query/src/buildQueryObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function buildQueryObject<T extends QueryFormData>(formData: T):
} = formData;

const groupbySet = new Set([...columns, ...groupby]);
const numericRowLimit = Number(row_limit);

const queryObject: QueryObject = {
extras: processExtras(formData),
Expand All @@ -42,7 +43,7 @@ export default function buildQueryObject<T extends QueryFormData>(formData: T):
metrics: processMetrics(formData),
order_desc: typeof order_desc === 'undefined' ? true : order_desc,
orderby: [],
row_limit: Number(row_limit),
row_limit: row_limit == null || isNaN(numericRowLimit) ? undefined : numericRowLimit,
since,
time_range,
timeseries_limit: limit ? Number(limit) : 0,
Expand Down

1 comment on commit 98b6117

@vercel
Copy link

@vercel vercel bot commented on 98b6117 Apr 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.