Two men were taken to hospital after being savagely attacked - and were then arrested by police.
Officers were called to the flat in Kilton, Worksop, after reports that four men had burst in and attacked the occupants with a hammer and golf clubs.
One of the victims was knocked unconscious. and both suffered leg injuries.
The attackers fled in a car at 10pm on Wednesday night.
But when officers arrived at the flat, they found eight cannabis plants and growing equipment.
The attack victims were taken to Bassetlaw Hospital for treatment and were then arrested on suspicion of cultivation of cannabis.
They have since been released under investigation pending further enquiries.