villebro commented on code in PR #21931: URL: https://github.com/apache/superset/pull/21931#discussion_r1007760265
########## superset/reports/commands/execute.py: ########## @@ -77,11 +77,24 @@ logger = logging.getLogger(__name__) -def _get_user() -> User: - user = security_manager.find_user(username=app.config["THUMBNAIL_SELENIUM_USER"]) - if not user: - raise ReportScheduleSelleniumUserNotFoundError() - return user +def _get_user(report_schedule: ReportSchedule) -> User: + user_types = app.config["ALERT_REPORTS_EXECUTE_AS"] + for user_type in user_types: + if user_type == "selenium": Review Comment: No luck 🙁 `Expected type 'List[ReportScheduleExecutor]', got 'List[str]' instead`. I made the change anyway, it does look better (and anyone who wants to use the literal value can do that if they want to). -- 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]
