Fix default navigation theme selection

What does this MR do?

When an user has an invalid theme_id, the default navigation theme is not selected in the preferences page.


Why was this MR needed?

It fixes UI.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #37777 (closed)

Merge request reports