rimashah25 commented on a change in pull request #5480:
URL: https://github.com/apache/trafficcontrol/pull/5480#discussion_r566396009



##########
File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
##########
@@ -862,8 +863,8 @@ func updateV31(w http.ResponseWriter, r *http.Request, inf 
*api.APIInfo, dsV31 *
                if err != nil {
                        return nil, http.StatusInternalServerError, nil, 
fmt.Errorf("querying delivery service with sslKeyVersion failed: %s", err)
                }
-               if ds.CDNName != nil && ds.RoutingName != nil {
-                       if sslKeysExist && (oldDetails.OldCdnName != 
*ds.CDNName || oldDetails.OldRoutingName != *ds.RoutingName) {
+               if (ds.CDNName != nil || ds.CDNID != nil) && ds.RoutingName != 
nil {
+                       if sslKeysExist && (*oldDetails.OldCdnId != *ds.CDNID 
|| oldDetails.OldCdnName != *ds.CDNName || oldDetails.OldRoutingName != 
*ds.RoutingName) {

Review comment:
       I feel that I am complicating the solution by defining CDNID as a 
pointer of type int instead of int.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to