Repository navigation
fix: use API server URL for site title in "Find data" tab - #119
Merged
paulmueller merged 1 commit intoOct 23, 2026
Merged
Conversation
`WidgetFindData` passed the server from the settings to
`StatusWidget.get_title`. In the playground, the server is stored
without scheme ("dcor-dev.mpl.mpg.de"), so fetching the site title
failed with `MissingSchema`. Use `get_ckan_api().server` instead,
which contains the correct scheme (https by default, or http if
configured, e.g. for local test environments), like the status widget
already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paulmueller-agent
force-pushed
the
fix-status-widget-scheme
branch
from
October 23, 2026 08:48
2e0ec04 to
5f39860
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the playground user scenario, the setup wizard stores the server as
dcor-dev.mpl.mpg.de, without a scheme. On startup with an empty metadata cache, this was logged:It came from the "Find data" tab (
WidgetFindData.__init__), which passed the raw settings value toStatusWidget.get_title(). The status widget itself was not affected: its worker already passesapi.server, whichCKANAPInormalises (_make_server_url).Fix
WidgetFindDatanow usesget_ckan_api().server, so the scheme comes fromCKANAPI:https://by default, orhttp://if the server is configured that way, e.g. for a local test environment.StatusWidget.get_title()andget_favicon()get docstrings saying thatservermust be a URL including the scheme (e.g.CKANAPI.server).(An earlier version of this PR added
https://inside the status widget. As you pointed out, that would be wrong for HTTP-only servers, so it was replaced by this approach.)Tests
tests/test_gui_find_data.py, with isolatedQSettingsand a mockedget_title. It checks that the panel requests the title forhttps://dcor-dev.mpl.mpg.dewhendcor-dev.mpl.mpg.deis stored, and forhttp://192.168.122.143when that is stored. Onmain, the first case fails.MissingSchemaerrors anymore, and the site metadata of dcor-dev is cached.🤖 Generated with Claude Code