dpgaspar commented on code in PR #21765:
URL: https://github.com/apache/superset/pull/21765#discussion_r994340813
##########
superset/reports/commands/execute.py:
##########
@@ -675,12 +673,13 @@ def __init__(self, task_id: str, model_id: int,
scheduled_dttm: datetime):
def run(self) -> None:
with session_scope(nullpool=True) as session:
try:
- self.validate(session=session)
- if not self._model:
- raise ReportScheduleExecuteUnexpectedError()
- ReportScheduleStateMachine(
- session, self._execution_id, self._model,
self._scheduled_dttm
- ).run()
+ with override_user(_get_user()):
Review Comment:
@zhaoyongjie yes it switches the user, just wondering why we need `g.user`
set on async tasks, to set `changed_by` fields?
--
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]