Skip to content

Commit

Permalink
fix: exclude parentID and children from diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifosmin Simon committed Nov 12, 2024
1 parent 7256bf3 commit ade1a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/provider/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func normalizeDetails(details map[string]interface{}) (map[string]interface{}, e

func compareResources(existingResource, newResource domain.Resource) (bool, string) {
opts := cmp.Options{
cmpopts.IgnoreFields(domain.Resource{}, "ID", "CreatedAt", "UpdatedAt"),
cmpopts.IgnoreFields(domain.Resource{}, "ID", "CreatedAt", "UpdatedAt", "ParentID", "Children"),
cmpopts.SortSlices(func(x, y map[string]any) bool {
return x["name"].(string) < y["name"].(string) // Assumes each entry has a unique name field
}),
Expand Down

0 comments on commit ade1a41

Please sign in to comment.