Threats of legal action force a contract set aside which could have seen second-hand equipment supplied to the city