rawlinp closed pull request #3137: Fix TO query for crconfig column rename
URL: https://github.com/apache/trafficcontrol/pull/3137
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/traffic_ops_golang/cdn/dnssec.go 
b/traffic_ops/traffic_ops_golang/cdn/dnssec.go
index bfd019597..446ef5a7c 100644
--- a/traffic_ops/traffic_ops_golang/cdn/dnssec.go
+++ b/traffic_ops/traffic_ops_golang/cdn/dnssec.go
@@ -121,7 +121,7 @@ func GetDNSSECKeysV11(w http.ResponseWriter, r 
*http.Request) {
 
 func GetDSRecordTTL(tx *sql.Tx, cdn string) (time.Duration, error) {
        ttlSeconds := 0
-       if err := tx.QueryRow(`SELECT JSON_EXTRACT_PATH_TEXT(content, 'config', 
'ttls', 'DS') FROM snapshot WHERE cdn = $1`, cdn).Scan(&ttlSeconds); err != nil 
{
+       if err := tx.QueryRow(`SELECT JSON_EXTRACT_PATH_TEXT(crconfig, 
'config', 'ttls', 'DS') FROM snapshot WHERE cdn = $1`, cdn).Scan(&ttlSeconds); 
err != nil {
                return 0, errors.New("getting cdn '" + cdn + "' DS Record TTL 
from CRConfig: " + err.Error())
        }
        return time.Duration(ttlSeconds) * time.Second, nil


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to