You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/07/22 17:33:20 UTC

[GitHub] [airflow] hussein-awala commented on issue #32700: Dynamic task mapping error: can't map over value of type

hussein-awala commented on issue #32700:
URL: https://github.com/apache/airflow/issues/32700#issuecomment-1646635818

   Could you provide the dag run conf for the failed dag run?
   
   Also, could you try returning an empty list when the flights is None?
   ```python
       def validate(**kwargs) -> List[Dict]:
           payload: dict = {key: value for key, value in list(kwargs['dag_run'].conf.items())}
   
           # payload is a list of dicts
           # [ {"flight_id": 123},
           #   {"flight_id": 456}
           # ]
           if not payload or all(isinstance(x, dict) for x in payload):
               raise AirflowFailException(f"Bad Config Submitted: {kwargs['dag_run'].conf}")
   
           return payload["flights"] or []
   ```


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