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/04/12 12:22:11 UTC

[GitHub] [airflow] kaxil commented on a diff in pull request #22944: fix trigger event payload is not persisted in db

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


##########
airflow/models/trigger.py:
##########
@@ -115,7 +115,7 @@ def submit_event(cls, trigger_id, event, session=None):
             TaskInstance.trigger_id == trigger_id, TaskInstance.state == State.DEFERRED
         ):
             # Add the event's payload into the kwargs for the task
-            next_kwargs = task_instance.next_kwargs or {}
+            next_kwargs = dict(task_instance.next_kwargs) if task_instance.next_kwargs else {}

Review Comment:
   Can you give a reproducible case, I am not sure how this fixes any issue?
   
   If `task_instance.next_kwargs` is `None`, `next_kwargs` is set to `{}`, else it will be a dict. Do you see a case where it won't be a dict?



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