dstandish commented on code in PR #42808:
URL: https://github.com/apache/airflow/pull/42808#discussion_r1794232995


##########
airflow/api_connexion/schemas/task_instance_schema.py:
##########
@@ -69,22 +68,17 @@ class Meta:
     executor = auto_field()
     executor_config = auto_field()
     note = auto_field()
-    sla_miss = fields.Nested(SlaMissSchema, dump_default=None)
     rendered_map_index = auto_field()
     rendered_fields = JsonObjectField(dump_default={})
     trigger = fields.Nested(TriggerSchema)
     triggerer_job = fields.Nested(JobSchema)
 
     def get_attribute(self, obj, attr, default):
-        if attr == "sla_miss":
-            # Object is a tuple of task_instance and slamiss
-            # and the get_value expects a dict with key, value
-            # corresponding to the attr.
-            slamiss_instance = {"sla_miss": obj[1]}
-            return get_value(slamiss_instance, attr, default)
-        elif attr == "rendered_fields":
-            return get_value(obj[0], 
"rendered_task_instance_fields.rendered_fields", default)
-        return get_value(obj[0], attr, default)
+        ti = obj if isinstance(obj, TaskInstance) else obj[0]

Review Comment:
   ah yes understand now. shared a patch on slack that i think gets everything 
clean now.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to