Skip to content

Commit

Permalink
Fix searchterm examples
Browse files Browse the repository at this point in the history
  • Loading branch information
derneuere committed Oct 12, 2024
1 parent ccf7ab6 commit bd8fe56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/api_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ def get_search_term_examples(user):
terms_time = [str(p.exif_timestamp.year)]
terms_people = []
if p.faces.count() > 0:
terms_people = [f.person.name.split(" ")[0] for f in faces]
terms_people = [
f.person.name.split(" ")[0] if f.person else "" for f in faces
]
terms_things = ""
if p.captions_json and p.captions_json["places365"] is not None:
terms_things = p.captions_json["places365"]["categories"]
Expand Down

0 comments on commit bd8fe56

Please sign in to comment.