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 2021/06/10 19:38:58 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #16345: Correctly handle None returns from Query.scalar()

kaxil commented on a change in pull request #16345:
URL: https://github.com/apache/airflow/pull/16345#discussion_r649475256



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1748,6 +1748,8 @@ def _schedule_dag_run(
     def _verify_integrity_if_dag_changed(self, dag_run: DagRun, session=None):
         """Only run DagRun.verify integrity if Serialized DAG has changed since it is slow"""
         latest_version = SerializedDagModel.get_latest_version_hash(dag_run.dag_id, session=session)
+        if latest_version is None:
+            raise AirflowException(f"Serialized DAG not found for DAG run {dag_run.id}.")

Review comment:
       ```suggestion
               raise SerializedDagNotFound(f"Serialized DAG not found for DAG run {dag_run.id}.")
   ```




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

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