Skip to content

Commit

Permalink
Add defensive coding to BackfillShippingYear
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobbins committed Sep 13, 2024
1 parent 296c2b4 commit b783458
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internals/maintenance_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,10 +759,11 @@ def get_all_shipping_stages_with_milestones(self) -> list[Stage]:
Stage.stage_type.IN(shipping_stage_types)).fetch()
shipping_stages_with_milestones = [
stage for stage in shipping_stages
if (stage.milestones.desktop_first or
stage.milestones.android_first or
stage.milestones.ios_first or
stage.milestones.webview_first)]
if (stage.milestones and
(stage.milestones.desktop_first or
stage.milestones.android_first or
stage.milestones.ios_first or
stage.milestones.webview_first))]
return shipping_stages_with_milestones

def calc_all_shipping_years(self) -> dict[int, int]:
Expand Down

0 comments on commit b783458

Please sign in to comment.