Skip to content

Commit a7bb8d7

Browse files
committed
Fix: Protected against invalid backfill model names in the plan builder
1 parent 91874ba commit a7bb8d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sqlmesh/core/plan/builder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,11 @@ def _build_models_to_backfill(self, dag: DAG[SnapshotId]) -> t.Optional[t.Set[st
338338
return {
339339
self._context_diff.snapshots[s_id].name
340340
for s_id in dag.subdag(
341-
*[self._model_fqn_to_snapshot[m].snapshot_id for m in self._backfill_models]
341+
*[
342+
self._model_fqn_to_snapshot[m].snapshot_id
343+
for m in self._backfill_models
344+
if m in self._model_fqn_to_snapshot
345+
]
342346
).sorted
343347
}
344348

0 commit comments

Comments
 (0)