dpgaspar commented on a change in pull request #11803:
URL:
https://github.com/apache/incubator-superset/pull/11803#discussion_r531570891
##########
File path: superset/cli.py
##########
@@ -260,10 +261,30 @@ def import_dashboards(path: str, recursive: bool,
username: str) -> None:
"--dashboard-file", "-f", default=None, help="Specify the the file to
export to"
)
@click.option(
- "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to
stdout"
+ "--print_stdout", "-p", is_flag=True, default=False, help="Print JSON to
stdout",
)
-def export_dashboards(dashboard_file: str, print_stdout: bool) -> None:
+def export_dashboards(
+ dashboard_file: Optional[str], print_stdout: bool = False
+) -> None:
"""Export dashboards to JSON"""
+ if app.config["DEFAULT_FEATURE_FLAGS"].get("VERSIONED_EXPORT"):
+ from superset.dashboards.commands.export import ExportDashboardsCommand
+ from superset.models.dashboard import Dashboard
+
+ g.user = security_manager.find_user(username="admin")
+
+ dashboard_ids = [id_ for (id_,) in
db.session.query(Dashboard.id).all()]
Review comment:
```
[dashboard.id for dashboard in db.session.query(Dashboard.id).all()]
```
is clearer, but no strong opinions about it
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]