What does 1 Kings 15:5 mean?
God had promised David that his descendants would always have a lamp burning in Jerusalem, because David did what was right and stayed loyal to God, except in the matter of Uriah the Hittite. 1 Kings 15:5 - Modern Text Bible
(God’s promise to David was based on David’s faithfulness, with the exception of his sin with Uriah.)