An attempted murder charge against a teenager has been dropped after a judge said police broke rules on CCTV identification.
The 17-year-old, who has dreadlocks, was accused of a machete attack in Watford High Street on 8 March.
Officers viewed CCTV and arrested the teenager who told police "I ain't the only black person with long hair".
Hertfordshire Police said it will "conduct a review of the investigation and our procedures accordingly".
At about 14:00 BST on 8 March a 23-year-old was punched and repeatedly struck with a machete near McDonalds.
He was treated in hospital for a wound to his left wrist which went through to the bone, but refused to make a complaint to the police or give his name.
The 17-year-old who police charged with attempted murder told officers he was at his family's home on the day of the attack.
'Total disregard for rules'
The prosecution offered no evidence against the teenager on charges of attempted murder, causing grievous bodily harm with intent and possessing an article with a blade.
During legal argument at St Albans Crown Court, defence barrister Mark Kimsey said evidence from two officers who reviewed CCTV footage in a control room at Watford police station was unsafe.
The court heard the pair had not signed in and out of the control room and no contemporaneous record was kept of the officers' identification of the suspect.
Judge Marie Catterson said there had been a "total disregard" for the code on CCTV identification under the Police and Criminal Evidence Act.
She asked for a transcript of her ruling to be sent to the Chief Constable of Hertfordshire.
"An important training issue about codes of practice on identification needs to be addressed urgently," she said.