uranusjr commented on code in PR #30117:
URL: https://github.com/apache/airflow/pull/30117#discussion_r1139921220


##########
airflow/cli/commands/dag_command.py:
##########
@@ -294,38 +294,46 @@ def dag_next_execution(args):
 
     if dag.get_is_paused():
         print("[INFO] Please be reminded this DAG is PAUSED now.", 
file=sys.stderr)
+        with create_session() as session:
+            last_parsed_dag: DagModel = (
+                session.query(DagModel).filter(DagModel.dag_id == dag.dag_id)
+            ).one_or_none()

Review Comment:
   Can this not be None? If not (suggested by the type hint), it should use 
`one` instead of `one_or_none`.



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