Skip to content

Commit 05258eb

Browse files
authoredDec 8, 2020
fix(event-flow-viz): handle null metadata selection (#11885)
* Initialize object with empty array if is multiselect, fix 500 BE error * modify data coming
1 parent 8f1ac7e commit 05258eb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
 

‎superset-frontend/src/explore/components/controls/SelectControl.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,9 @@ export default class SelectControl extends React.PureComponent {
102102
// Beware: This is acting like an on-click instead of an on-change
103103
// (firing every time user chooses vs firing only if a new option is chosen).
104104
onChange(opt) {
105-
let optionValue = null;
105+
let optionValue = this.props.multi ? [] : null;
106106
if (opt) {
107107
if (this.props.multi) {
108-
optionValue = [];
109108
opt.forEach(o => {
110109
// select all options
111110
if (o.meta === true) {

‎superset/viz.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2701,7 +2701,7 @@ def query_obj(self) -> QueryObjectDict:
27012701
entity_key = form_data["entity"]
27022702
meta_keys = [
27032703
col
2704-
for col in form_data["all_columns"]
2704+
for col in form_data["all_columns"] or []
27052705
if col != event_key and col != entity_key
27062706
]
27072707

0 commit comments

Comments
 (0)