Skip to content

Commit

Permalink
Handle corner case when the entity-mapping doesn't return any entity …
Browse files Browse the repository at this point in the history
…but also there are no errors
  • Loading branch information
joserc87 committed Dec 6, 2023
1 parent 653f9e3 commit 869d35e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ravenpackapi/models/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def __init__(self, data):
self.candidates = [
RPMappingCandidate(candidate) for candidate in data.get("rp_entities", [])
]
if not self.candidates and not self.errors:
self.errors = [self.request]

if not self.errors:
# let's put the best candidate data on the obj for convenience
Expand Down

0 comments on commit 869d35e

Please sign in to comment.