Skip to content

Commit

Permalink
Fix team uniqueness db migration (#4416)
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasb authored May 28, 2024
1 parent ef47e54 commit 8160482
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def clean_up_duplicated_teams(apps, schema_editor):
for team in duplicated_teams:
# if there is anything to migrate, do it here
team.escalation_chains.update(team=first_team)
team.alert_receive_channels.exclude(integration="direct_paging").update(team=first_team)
# remove direct paging integrations before removing teams
team.alert_receive_channels.filter(integration="direct_paging").delete()
team.alert_receive_channels.update(team=first_team)
team.custom_on_call_shifts.update(team=first_team)
team.oncall_schedules.update(team=first_team)
team.webhooks.update(team=first_team)
Expand Down

0 comments on commit 8160482

Please sign in to comment.