Antonio-RiveroMartnez commented on code in PR #29894: URL: https://github.com/apache/superset/pull/29894#discussion_r1709769679
########## superset/commands/dashboard/delete.py: ########## @@ -37,6 +38,19 @@ logger = logging.getLogger(__name__) +class DeleteEmbeddedDashboardCommand(BaseCommand): + def __init__(self, dashboard: Dashboard): + self._dashboard = dashboard + + @transaction(on_error=partial(on_error, reraise=DashboardDeleteEmbeddedFailedError)) + def run(self) -> None: + self.validate() + return EmbeddedDashboardDAO.delete(self._dashboard.embedded) + + def validate(self) -> None: + pass Review Comment: Should we include some minimal validations like: the model exist, etc? ########## superset/commands/dashboard/delete.py: ########## @@ -37,6 +38,19 @@ logger = logging.getLogger(__name__) +class DeleteEmbeddedDashboardCommand(BaseCommand): Review Comment: Are we missing the usage of this command in some other place besides the test file? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
