fix: guard against empty query in SPARQL generator (#870)#902
Closed
SAY-5 wants to merge 1 commit into
Closed
Conversation
Contributor License AgreementThank you for your contribution! Before we can accept it, the following contributor(s) must sign our CLA: Please read the appropriate agreement:
Once you have read the appropriate agreement, post the following as a comment on this PR (copy and paste exactly): The bot will record your signature and update this PR automatically. |
Contributor
|
@SAY-5 can you please take a look at the Contributor License Agreement notice above? |
Author
|
Apologies for the delay. I'm not able to sign the CLA at this time, so feel free to close this if that's a blocker. The fix itself is small and the diff stands on its own if a maintainer wants to pick it up. |
Contributor
|
Closed as not able to complete the CLA currently. Thanks for your interest in the project! |
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.
Fixes #870.
Guard
query.split()[0]so a future refactor that loosens or removes thestartswithcheck cannot turn an empty/whitespace response into an unhandled IndexError. The new condition uses the already-split list, so the public behavior on valid queries is unchanged.