Skip to content

Commit

Permalink
Remove the rest of isValidDatasourceType check
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams committed Jun 8, 2022
1 parent 95e59c9 commit c567756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,4 @@ export const DEFAULT_METRICS = [
},
];

export const isValidDatasourceType = (datasource: DatasourceType) =>
datasource === DatasourceType.Dataset ||
datasource === DatasourceType.SlTable ||
datasource === DatasourceType.SavedQuery ||
datasource === DatasourceType.Query;

export default {};
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import { t, styled, withTheme, isValidDatasourceType } from '@superset-ui/core';
import { t, styled, withTheme, DatasourceType } from '@superset-ui/core';
import { getUrlParam } from 'src/utils/urlUtils';

import { AntdDropdown } from 'src/components';
Expand Down Expand Up @@ -303,7 +303,7 @@ class DatasourceControl extends React.PureComponent {
)}
<AntdDropdown
overlay={
isValidDatasourceType(datasource.type)
datasource.type === DatasourceType.Query
? queryDatasourceMenu
: defaultDatasourceMenu
}
Expand Down

0 comments on commit c567756

Please sign in to comment.