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/09 17:57:07 UTC

[3/4] incubator-trafficcontrol git commit: collapse the DB updates into one update only

collapse the DB updates into one update only


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

Branch: refs/heads/master
Commit: dd8cb28d94b943998cb0393baa1fc04016e4c846
Parents: 54f2b0c
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Mon May 8 13:01:44 2017 -0400
Committer: Dewayne Richardson <de...@apache.org>
Committed: Tue May 9 11:56:59 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/UI/Server.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/dd8cb28d/traffic_ops/app/lib/UI/Server.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/Server.pm b/traffic_ops/app/lib/UI/Server.pm
index 2988af7..20f2f12 100644
--- a/traffic_ops/app/lib/UI/Server.pm
+++ b/traffic_ops/app/lib/UI/Server.pm
@@ -987,9 +987,11 @@ sub postupdate {
 
 	#Parameters don't have boolean options at this time, so we're going to compare against the default string value of 0.
 	if ( defined($use_reval_pending) && $use_reval_pending ne '0' && defined($reval_updated) ) {
-		$update_server->update( { reval_pending => $reval_updated } );
+		$update_server->update( { reval_pending => $reval_updated, upd_pending => $updated } );
+	}
+	else {
+		$update_server->update( { upd_pending => $updated } );
 	}
-	$update_server->update( { upd_pending => $updated } );
 
 	$self->render( text => "Success", layout=>undef);