mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fixed 500 error when export dashboard (#2760)
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
This commit is contained in:
parent
9b34600c8e
commit
e7946451d6
@ -472,6 +472,8 @@ class DashboardModelView(SupersetModelView, DeleteMixin): # noqa
|
||||
|
||||
@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:]))
|
||||
|
Loading…
Reference in New Issue
Block a user