kaxil commented on code in PR #22909:
URL: https://github.com/apache/airflow/pull/22909#discussion_r847411580
##########
airflow/models/dagrun.py:
##########
@@ -838,14 +838,24 @@ def verify_integrity(self, session: Session =
NEW_SESSION):
ti.state = State.REMOVED
continue
- if task.is_mapped:
- task = cast("MappedOperator", task)
- num_mapped_tis = task.parse_time_mapped_ti_count
- # Check if the number of mapped literals has changed and we
need to mark this TI as removed
- if not num_mapped_tis or ti.map_index >= num_mapped_tis:
+ if not task.is_mapped:
+ continue
+ task = cast("MappedOperator", task)
+ num_mapped_tis = task.parse_time_mapped_ti_count
+ # Check if the number of mapped literals has changed and we need
to mark this TI as removed
+ if num_mapped_tis is not None:
+ if ti.map_index >= num_mapped_tis:
+ self.log.debug(
Review Comment:
Should we add a test case for this?
--
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]