When real property has been sold pursuant to a levy, the purchaser of the property, or any person who has succeeded to the interest of the purchaser, may recover damages from the person causing the injury for injury to the property after levy and before possession is delivered to the purchaser or the person who has succeeded to the interest of the purchaser.