-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix human-readable name for ImageMetadata #1558
Conversation
As discussed, I don't think this is the solution, Not accepting HostnameHttpUrls and IPHttpUrls seems too strict too. The model might need to be more flexible, and the normalizer more flexible about the input_ooi type |
dfadacf
to
f48753b
Compare
The Webpage Capture boefje creates images from HostnameHTTPURL OOIs, which means that after the normalizer creates an ImageMetadata OOI its reference points to a HostnameHTTPURL OOI instead of an HTTPResource OOI. #1560 was created to fix this, but for now we can fix the human-readable name by trying to the reference as a HTTPResource first and HostnameHTTPURL if this fails. This fixes the "IndexError at /en/mispoes/objects/, pop from empty list" error.
f48753b
to
06dc222
Compare
Changed the PR: first try to parse the reference |
In the model definition the reference points to only |
#1559 was created to fix the Webpage Capture boefje, #1560 was created to fix the normaliser that creates the ImageMetadata OOI. As far as I know there is currently no way to have a The only two ways we currently have to discern ImageMetadata OOIs referencing HostnameHTTPURL OOIs instead of an HTTPResource OOI is to count the number of |
Checklist for QA:
What works:
|
Co-authored-by: Patrick <[email protected]> Co-authored-by: Jeroen Dekkers <[email protected]>
* main: Add sectxt dependency (#1610) Refactor environment settings, names, and documentation (#1517) Add pipeline to check if there are new translation strings (#1606) Translations update from Hosted Weblate (#1604) Update scheduler documentation (#1476) Add community install/update scripts (#1309) Bump actions/checkout from 1 to 3 (#1598) Run docker-compose pull in make pull (#1585) Configure github actions in dependabot (#1594) fix many ports open normalizer (#1592) Fix human-readable name for ImageMetadata (#1558) Upgrade FastAPI (#1576) OOI Detail page: Remember page position after clicking the "show inheritance" link (#1590) Fix `rstcheck` hook (#1584)
* main: Fix env setting issues found in test debian workflow (#1608) Add sectxt dependency (#1610) Refactor environment settings, names, and documentation (#1517) Add pipeline to check if there are new translation strings (#1606) Translations update from Hosted Weblate (#1604) Update scheduler documentation (#1476) Add community install/update scripts (#1309) Bump actions/checkout from 1 to 3 (#1598) Run docker-compose pull in make pull (#1585) Configure github actions in dependabot (#1594) fix many ports open normalizer (#1592) Fix human-readable name for ImageMetadata (#1558) Upgrade FastAPI (#1576) OOI Detail page: Remember page position after clicking the "show inheritance" link (#1590) Fix `rstcheck` hook (#1584) Manage boefjes requirements with Poetry (#1572)
Co-authored-by: Patrick <[email protected]> Co-authored-by: Jeroen Dekkers <[email protected]>
Co-authored-by: Patrick <[email protected]> Co-authored-by: Jeroen Dekkers <[email protected]>
Changes
The Webpage Capture boefje creates images from HostnameHTTPURL OOIs,
which means that after the normalizer creates an ImageMetadata OOI
its reference points to a HostnameHTTPURL OOI instead of an HTTPResource
OOI. #1560 was created to fix this, but for
now we can fix the human-readable name by trying to parse the reference
as a HTTPResource first and HostnameHTTPURL if this fails.
This fixes the "IndexError at /en/mispoes/objects/, pop from empty list"
error.
Issue link
Fixes #1539
Proof
Please add some proof of your working change here, unless this is not required (e.g. this PR is trivial).
Code Checklist
Communication
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.