The New York Democratic presidential primary must take place June 23 because canceling it would be unconstitutional, a judge ruled Tuesday.

U.S. District Judge Analisa Torres ruled after hearing arguments a day earlier as lawyers for withdrawn presidential candidates Bernie Sanders and Andrew Yang argued that it was wrong to cancel the primary.

The judge said there was enough time before the primary occurs to figure out how to carry it out safely.

»COMPLETE COVERAGE: CORONAVIRUS

The Democratic members of the State’s Board of Elections voted to cancel the primary even though New York was still planning to hold its congressional and state-level primaries June 23. They cited the coronavirus as a reason to cancel the election since Joe Biden is now unopposed.