A furious woman who discovered her partner from Chester had set up a cannabis growing unit in her attic rang the police.
Officers went to the house in Ash Grove, Shotton, and found 12 large cannabis plants, between 2ft and 3ft tall growing inside a tent.
There were five small plants under heat on a shelf, together with 21 smaller seedlings.
Mold Crown Court heard the mature plants had the potential to produce 610 grammes of potent skunk cannabis with an estimated street value of £4,350.
But prosecutor Gareth Parry said if all the plants matured then there was a potential yield of 1,300 grammes with an estimated street value of £9,700.
Ricky Jones, of Durham Road in Blacon - who initially denied all knowledge and said the plants must belong to his girlfriend – admitted producing cannabis at her home between October 1 and December 7 last year.
When he was jailed for 12 months, the 24-year-old called out from the dock, and said to the judge: “You are sending me to jail for that?”
After he made other comments as he was taken down the steps to the cell block, the judge, Mr Recorder Jeremy Jenkins, said he would be happy to bring him back up and deal with him for contempt if he required.
But Paul Abraham, defending, said it was an example of his client’s immaturity and he would speak to him.
When contacted by the police initially on his phone, he denied all knowledge of the cannabis plants and said they were not his but his partner’s.
His fingerprints were found on the side of a light, on a plant pot and on a box.
Jones had been jailed for eight weeks in May of last year for possessing cannabis with intent to supply and production of cannabis.