ashb commented on a change in pull request #10924:
URL: https://github.com/apache/airflow/pull/10924#discussion_r487739182
##########
File path: airflow/models/taskinstance.py
##########
@@ -571,7 +571,11 @@ def refresh_from_task(self, task, pool_override=None):
self.run_as_user = task.run_as_user
self.max_tries = task.retries
self.executor_config = task.executor_config
- self.operator = task.__class__.__name__
+ if task.__class__.__name__ != "SerializedBaseOperator":
+ self.operator = task.__class__.__name__
+ else:
+ self.operator = task.task_type
Review comment:
I think this can simply be
```suggestion
self.operator = task.task_type
```
As BaseOperator already has a task_type property
----------------------------------------------------------------
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]