Skip to content

Commit

Permalink
Ignoring unnecessary updates
Browse files Browse the repository at this point in the history
  • Loading branch information
satr committed Nov 15, 2023
1 parent 0508586 commit a5198a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/applications/applications_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"net/http"
"reflect"
"strings"

applicationModels "github.com/equinor/radix-api/api/applications/models"
Expand Down Expand Up @@ -598,6 +599,9 @@ func (ah *ApplicationHandler) RegenerateDeployKey(ctx context.Context, appName s
updatedRegistration.Spec.DeployKeyPublic = ""
updatedRegistration.Spec.DeployKey = ""
setConfigBranchToFallbackWhenEmpty(updatedRegistration)
if reflect.DeepEqual(updatedRegistration, currentRegistration) {
return nil
}
if err := ah.isValidRegistrationUpdate(updatedRegistration, currentRegistration); err != nil {
return err
}
Expand Down

0 comments on commit a5198a2

Please sign in to comment.