Skip to content

Commit

Permalink
fixed 500 error when export dashboard (#2760)
Browse files Browse the repository at this point in the history
https://github.com/airbnb/superset/blob/master/superset/views/core.py#L474

http://flask-appbuilder.readthedocs.io/en/latest/actions.html?highlight=action

```
@action("mulexport", __("Export"), __("Export dashboards?"), "fa-database")
    def mulexport(self, items):
        ids = ''.join('&id={}'.format(d.id) for d in items)
```
change to 
```
@action("mulexport", __("Export"), __("Export dashboards?"), "fa-database")
    def mulexport(self, items):
        if not isinstance(items, list):
            items = [items]
        ids = ''.join('&id={}'.format(d.id) for d in items)
```

fixed:
#2184
#2667
  • Loading branch information
eeve authored and mistercrunch committed May 16, 2017
1 parent 9b34600 commit e794645
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ def pre_delete(self, obj):

@action("mulexport", __("Export"), __("Export dashboards?"), "fa-database")
def mulexport(self, items):
if not isinstance(items, list):
items = [items]
ids = ''.join('&id={}'.format(d.id) for d in items)
return redirect(
'/dashboardmodelview/export_dashboards_form?{}'.format(ids[1:]))
Expand Down

0 comments on commit e794645

Please sign in to comment.