Skip to content

Commit

Permalink
ff-159 Fixed the exception in the API when no entries found. (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiendil authored Nov 18, 2024
1 parent 8890c19 commit a57399f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

- ff-158 — Improved prompts to produce less tags of better quality.
- ff-159 — Fixed the exception in the API when no entries found.
5 changes: 4 additions & 1 deletion ffun/ffun/api/http_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ async def _external_entries( # pylint: disable=R0914

tags_ids = await o_domain.get_tags_ids_for_entries(entries_ids)

whole_tags = set.union(*tags_ids.values())
if tags_ids:
whole_tags = set.union(*tags_ids.values())
else:
whole_tags = set()

tags_mapping = await o_domain.get_tags_by_ids(whole_tags)

Expand Down

0 comments on commit a57399f

Please sign in to comment.