Skip to content

Commit

Permalink
Added comment to explain change in plan logic for UpdateOld endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
troll-os committed Oct 22, 2024
1 parent d378655 commit 1292dac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plan/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ func (p *Plan) Calculate() *Plan {
if p.OwnerID != "" {
changes.Delete = endpoint.FilterEndpointsByOwnerID(p.OwnerID, changes.Delete)
changes.Delete = endpoint.RemoveDuplicates(changes.Delete)
// When running a migration we don't want to filter out endpoint duplicates on ownerId value so that old records
// are deleted correctly
if !hasMig {
changes.UpdateOld = endpoint.FilterEndpointsByOwnerID(p.OwnerID, changes.UpdateOld)
}
Expand Down

0 comments on commit 1292dac

Please sign in to comment.