Skip to content

Commit c9d4963

Browse files
committed
update IsAutomatedSyncEnabled function
Signed-off-by: Anand Kumar Singh <[email protected]>
1 parent e140abc commit c9d4963

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/apis/application/v1alpha1/types.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -1434,12 +1434,10 @@ type SyncPolicy struct {
14341434

14351435
// IsAutomatedSyncEnabled checks if the automated sync is enabled or disabled
14361436
func (p *SyncPolicy) IsAutomatedSyncEnabled() bool {
1437-
var isEnabled bool
1438-
14391437
if p.Automated != nil && (p.Automated.Enable == nil || *p.Automated.Enable) {
1440-
isEnabled = true
1438+
return true
14411439
}
1442-
return isEnabled
1440+
return false
14431441
}
14441442

14451443
// IsZero returns true if the sync policy is empty

0 commit comments

Comments
 (0)