A Michigan judge is dismissing a lawsuit that threatened to push Detroit to the brink of insolvency. Detroit officials claimed the city would be broke by the end of the week unless the legal action was stopped. The head attorney for Detroit challenged a recent consent agreement allowing the state to oversee the city’s finances, arguing it was invalid because the state owes Detroit money. The state retaliated by threatening to withhold millions of dollars needed to cover a bond issue and two major bond agencies downgraded Detroit’s already-low rating even further. Detroit Mayor Dave Bing hired a private law firm to fight the city’s own attorney and now a judge is ruling that only the Mayor has the authority to sue over the consent agreement. It leaves Bing able to say what he’s wanted to for a week. “The city of Detroit is going to make its $34.2 million bond debt payment by Friday.” But Detroit still faces more than $12 billion in long term debt.