ocket8888 commented on code in PR #7099: URL: https://github.com/apache/trafficcontrol/pull/7099#discussion_r1005066584
########## traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go: ########## @@ -1023,6 +1027,7 @@ func scanDSInfoRow(row *sql.Row) (DSInfo, bool, error) { } return DSInfo{}, false, fmt.Errorf("querying delivery service server ds info: %v", err) } + di.Active = active == tc.DSActiveStateActive Review Comment: A boolean is not being assigned to a string. A boolean is being assigned to the outcome of comparing two strings. A Delivery Service where `"active": true` in the old data model is equivalent to `"active": "ACTIVE"` in the new data model. So if `active` is exactly `tc.DSActiveStateActive`, then `di.Active` should be `true`. If it's anything else, `di.Active` should be false. Which is what this line does. -- 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. To unsubscribe, e-mail: issues-unsubscr...@trafficcontrol.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org