Modify URL assignment based on data type - Fix adding qna_pair when "where" fails check due to wrong source
Description
Refactored the code that decides how URL is assigned to handle the special case when the data type is included in the SpecialDataType enumeration. Ensuring appropriate handling of such special data types allows significant flexibility and accuracy when dealing with a variety of data types.
Fixes #611
Type of change
Please delete options that are not relevant.
- [X] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Tried to add a qna_pair.
app.add(("Hi", "How are you?"))
app.add(source=("Hi", "How are you?"), data_type="qna_pair")
Checklist:
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [X] I have commented my code, particularly in hard-to-understand areas
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes
- [X] I have checked my code and corrected any misspellings
Maintainer Checklist
- [X] Made sure Checks passed
@reixd thanks a lot for your contribution, I missed your PR. I've updated the new version with a similar fix. Can you please rebase your branch, we can add your extra test. Again, thanks a lot! ❤️
@reixd Can you please rebase so that we can quickly review and merge the PR?
thanks for your contribution @reixd . Will have to close this PR as the code has become stale.