Skip to content

Commit

Permalink
fix source field validation
Browse files Browse the repository at this point in the history
  • Loading branch information
valeksiev committed Nov 29, 2024
1 parent 97d277c commit c90d600
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions alkemio_virtual_contributor_engine/events/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def __init__(self, source: Dict[str, str]):
self.score = source.get("score")
self.uri = source.get("uri")

if all(
[self.document_id, self.source, self.title, self.type, self.score, self.uri]
):
if not all([self.uri]):
raise ValueError("Missing required fields in source dictionary")

def to_dict(self):
Expand Down

0 comments on commit c90d600

Please sign in to comment.