Fix goToPage() when page_id is not found

CURA-6435
This commit is contained in:
Lipu Fei 2019-04-08 09:20:22 +02:00
parent 7d096e5734
commit dfa35bd589

View File

@ -146,7 +146,8 @@ class WelcomePagesModel(ListModel):
page_index = self.getPageIndexById(page_id)
if page_index is None:
# FIXME: If we cannot find the next page, we cannot do anything here.
Logger.log("e", "Cannot find page with ID [%s]", page_index)
Logger.log("e", "Cannot find page with ID [%s], go to the next page by default", page_index)
self.goToNextPage()
return
if self._shouldPageBeShown(page_index):