kaxil commented on code in PR #49809:
URL: https://github.com/apache/airflow/pull/49809#discussion_r2066010142


##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1099,6 +1130,19 @@ def _execute_task(context: Context, ti: 
RuntimeTaskInstance, log: Logger):
     return result
 
 
+def _render_map_index(context: Context, ti: RuntimeTaskInstance, log: Logger) 
-> str | None:
+    """Render named map index if the DAG author defined map_index_template at 
the task level."""
+    if template := context.get("map_index_template") is None:
+        return None

Review Comment:
   ```suggestion
       if (template := context.get("map_index_template")) is None:
           return None
   ```
   
   Otherwise, `template` will always be a "bool" and you will see following 
error:
   
   <img width="972" alt="image" 
src="https://github.com/user-attachments/assets/63e0beac-a977-47d4-b95d-4c26a11c470f";
 />
   



-- 
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]

Reply via email to