The mainstream media are celebrating Friday’s decision by a federal judge to force the White House to restore CNN correspondent Jim Acosta’s “hard pass.”

Judge Timothy J. Kelly’s decision is being treated as a victory for the free press, and proof that the Trump administration’s decision was wrong and violated Acosta’s constitutional rights. But the decision undermined the picture of the Trump administration the media have sought to portray, in three ways:

1. A Trump appointee ruled against Trump. The media, and their Democratic Party allies, have treated President Donald Trump’s judicial nominees as if they can be expected to be slavishly loyal to the administration. That is why, for example, they focused on Brett Kavanaugh’s views on whether a president can be indicted while in office. The left expects judges to vote their “party,” because that is what left-wing judges do. Kelly, a Trump appointee, did not.

2. Conservatism helped the media. Judge Kelly specifically said: “I must apply precedent as I see it,” even if he did not agree with it. Acosta won — thanks to the conservative judicial philosophy the president has prioritized in his appointees.

3. The president accepted the decision. President Trump accepted the validity of the decision. He also ordered the White House to develop new rules for press behavior, in conformity with the ruling that Acosta’s due process rights had been violated. Compared with Obama, who often tried to ignore court decisions he lost, Trump’s approach was refreshing — and the opposite of the “autocrat” image the media have contrived.

The case has not yet been decided on the merits. Trump could prevail — or Acosta’s suspension could turn out to be a political mistake.

But the system of checks and balances works better than ever — thanks, largely, to Trump.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.