You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upload a file with external_id in metadata and verify it is not present in the document's metadata but is present as a separate field. Check if the system relies on external_id being present in both places.
The code uses metadata_dict.pop("external_id", None) which removes the external_id from the metadata_dict. This might be incorrect if the system relies on the external_id being present in both the dedicated external_id field and within the metadata dictionary.
Missing Handling of Empty Metadata
Low
Upload a file with only external_id in the metadata.
If the metadata_dict is empty after popping the external_id, the code might behave unexpectedly in downstream processes that rely on the metadata.
Name: external_id parameter in ingest_text function call incorrect.
Severity: High
Example test case: Call the /ingest_text endpoint, providing a value for the external_id parameter. The document created will not have that external_id.
Description: In core/services/document_service.py, the ingest_text function definition includes the external_id parameter, however, when calling the Document constructor, the external_id argument is being passed in incorrectly. external_id=external_id if external_id else None, does not pass the value, so it is being passed as a boolean expression instead of the value of external_id. This means the external_id is never set.
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
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.
We have a need for our local DB's document IDs to match those in Morphik.
This allows for a metadata
external_idproperty to be set which overrides the default document UUID generator.