You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/13 04:26:01 UTC
[GitHub] [airflow] uranusjr commented on a change in pull request #22210: fix AttributeError
uranusjr commented on a change in pull request #22210:
URL: https://github.com/apache/airflow/pull/22210#discussion_r825385828
##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -283,7 +283,7 @@ def _get_ti_pod_labels(context: Optional[dict] = None, include_try_number: bool
return {}
ti = context['ti']
- run_id = getattr(ti, 'run_id') or context['run_id']
+ run_id = getattr(ti, 'run_id', context['run_id'])
Review comment:
Maybe simply `context["run_id"]` since that key is always present anyway?
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org