[AIRFLOW-604] Revert .first() to .one()
.one() enforces the integrity of airflow as we expect a tuple to be returned here. If not the database is inconsistent and airflow should error out. Dear Airflow Maintainers, .one() enforces the integrity of airflow as we expect a tuple to be returned here. If not the database is inconsistent and airflow should error out. partially reverts: https://github.com/apache /incubator-airflow/pull/1730 Closes #1858 from bolkedebruin/AIRFLOW-604
This commit is contained in:
Родитель
5616c029dc
Коммит
527e3ecdb8
|
@ -3654,10 +3654,10 @@ class DagRun(Base):
|
|||
DR.dag_id == self.dag_id,
|
||||
DR.execution_date == self.execution_date,
|
||||
DR.run_id == self.run_id
|
||||
).first()
|
||||
if dr:
|
||||
self.id = dr.id
|
||||
self.state = dr.state
|
||||
).one()
|
||||
|
||||
self.id = dr.id
|
||||
self.state = dr.state
|
||||
|
||||
@staticmethod
|
||||
@provide_session
|
||||
|
|
Загрузка…
Ссылка в новой задаче