Organization context fails to change in web UI
The problem appears to happen for newly created orgs.
This seems to be "caused" by #29474 where we've stopped to update title on create.
Together with wrong condition in `set_title` we end up with empty title in the database.
Description of problem:
On Foreman with Katello many test organizations created, I created an org "proxy-test", I tried a few times to select that org, but the web UI context menu keeps showing Any Organization
Version-Release number of selected component (if applicable):
web UI context menu keeps showing Any Organization
web UI context menu shows org you select
Fixes #34416 - taxonomy title in ForemanContext
When creating new org/loc we did not save the title there.
In the app_metadata for the frontend we were taking these directly from db, so it disallowed the calculation on runtime.
This was wrong from b0d5a6c9b882fa078379ed90f8610ff021978e6b, but only when we switched to using these in the TaxonomySwitcher it started to exhibit in this bug.
Probably 299c2976888bce605d29bbecbc5e4cab4cfb9fc5 was where this actually broke, but only for new orgs, so it was not discovered.
This resolves firstly the issue of empty title in the database and secondly the issue not using methods to retrieve data, which we always should.