fix: skip None query input in QueryExpander - #12791
davidsbatista merged 2 commits into
Conversation
QueryExpander.run called str.strip on query before checking its type. A None query from a pipeline raised AttributeError. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@MohammadHijjawi97 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @MohammadHijjawi97, thanks for your interest in contributing to Haystack! 🙏 This is an automated message to help us keep the review queue healthy. |
|
Hi @MohammadHijjawi97, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Thanks for signing the CLA, @MohammadHijjawi97! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
|
CLA is signed now. This is ready for review whenever you have time. |
|
I will review this at the appropriate time, but I kindly ask you to respect the warnings regarding the number of PRs open and not open more PRs until what you already have open is reviewed. Not doing so will result in a permanent ban. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
Related Issues
No existing issue. This PR includes a regression test for the crash.
Proposed Changes:
Proposed Changes:
QueryExpander.runcalledquery.strip()before checking the type. ANonequery from a pipeline raisedAttributeError. Return an empty query list forNoneor non-string input, matching the existing empty-string warning path.How did you test it?
Added unit tests for
Nonequery with and withoutinclude_original_query. Existing empty/whitespace tests still pass.Notes for the reviewer
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.