You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2017/05/10 16:52:33 UTC

[2/2] incubator-trafficcontrol git commit: fixed an issue with editing DSs, this time a better way

fixed an issue with editing DSs, this time a better way


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/9d594388
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/9d594388
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/9d594388

Branch: refs/heads/master
Commit: 9d594388116208f7d8fad1a1a4c8a05654e4696f
Parents: 1a5b56a
Author: David Neuman <da...@gmail.com>
Authored: Wed May 10 10:45:54 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Wed May 10 10:52:26 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/UI/DeliveryService.pm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/9d594388/traffic_ops/app/lib/UI/DeliveryService.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/DeliveryService.pm b/traffic_ops/app/lib/UI/DeliveryService.pm
index 819dc97..51d7840 100644
--- a/traffic_ops/app/lib/UI/DeliveryService.pm
+++ b/traffic_ops/app/lib/UI/DeliveryService.pm
@@ -587,11 +587,7 @@ sub header_rewrite {
 		my @servers = $self->db->resultset('DeliveryserviceServer')->search( { deliveryservice => $ds_id } )->get_column('server')->all();
 		if ( $tier eq "mid" ) {
 			my @mtype_ids = &type_ids( $self, 'MID%', 'server' );
-			my $param = $self->db->resultset('Deliveryservice')->search( { 'me.profile' => $ds_profile }, { prefetch => 'cdn' } );
-			if (defined($param->next)) {
-				$cdn_name = $param->next->cdn->name;
-			}
-
+			$cdn_name = $self->db->resultset('Deliveryservice')->search( { 'me.profile' => $ds_profile }, { prefetch => 'cdn' } )->get_column('cdn.name')->single();
 			@servers = $self->db->resultset('Server')->search( { type => { -in => \@mtype_ids } } )->get_column('id')->all();
 		}