Skip to content

Commit

Permalink
fix: removed useless conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
hosekpeter committed Nov 12, 2024
1 parent 2c14c77 commit 2d06024
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions internal/pkg/state/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,8 @@ func (s *Registry) IgnoreConfig(ignoreID string, componentID string) {
v.Ignore = true

// ignore rows of the configuration
if len(s.ConfigRowsFrom(v.ConfigKey)) > 0 {
for _, configRowState := range s.ConfigRowsFrom(v.ConfigKey) {
configRowState.Ignore = true
}
for _, configRowState := range s.ConfigRowsFrom(v.ConfigKey) {
configRowState.Ignore = true
}
}
}
Expand Down
12 changes: 4 additions & 8 deletions pkg/lib/operation/project/sync/pull/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,11 @@ func Run(ctx context.Context, projectState *project.State, o Options, d dependen
}

func ignoreConfigsAndRows(projectState *project.State) {
if len(projectState.IgnoredConfigRows()) > 0 {
for _, v := range projectState.IgnoredConfigRows() {
v.SetRemoteState(nil)
}
for _, v := range projectState.IgnoredConfigRows() {
v.SetRemoteState(nil)
}

if len(projectState.IgnoredConfigs()) > 0 {
for _, v := range projectState.IgnoredConfigs() {
v.SetRemoteState(nil)
}
for _, v := range projectState.IgnoredConfigs() {
v.SetRemoteState(nil)
}
}

0 comments on commit 2d06024

Please sign in to comment.