Filter out triples with whitespace object #8
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.
A more complete backstory:
While editing an agendapoint in Gelinkt Notuleren, you can set and change the type of the besluit. When changing this type multiple times in a row, there would be some leftover spaces in the RDFa data (which is not illegal). For example:
This caused the RDFa parser to find the types:
and eventually created SPARQL queries like:
where the empty IRI
<>
caused the query to fail.In some situations, the service retries to publish resources up to 10 times until it eventually permanently fails to publish the resource. Every resources is published using multiple queries, and only 1 would not succeed, leaving some leftover data in the database that is not rolled back. This could cause 'phantom' uittreksels to show in the publicatie frontend, 10 to be exact:
This PR hopefully fixes this, by filtering out triples with empty (or white space) objects. A more complete fix would be to use a different RDFa parser that would properly handle multiple spaces.