Deductions & credits

I allocated the purchase price of my rental  to land and building. But only building was depreciated when I converted my second home to rental in 2022. I sold it in 2023. Should I just allocate the purchase price to building and not reflect any part of sale price to land?