9155: Unhandled AttributeError when db.get_tag_from_handle returns None

This commit is contained in:
romjerome 2016-01-06 14:51:43 +01:00
parent 3cb64cdca8
commit faaabcef3a

View File

@ -532,6 +532,7 @@ class PeopleBaseModel(BaseModel):
""" """
cached, value = self.get_cached_value(tag_handle, "TAG_NAME") cached, value = self.get_cached_value(tag_handle, "TAG_NAME")
if not cached: if not cached:
if self.db.get_tag_from_handle(tag_handle):
value = self.db.get_tag_from_handle(tag_handle).get_name() value = self.db.get_tag_from_handle(tag_handle).get_name()
self.set_cached_value(tag_handle, "TAG_NAME", value) self.set_cached_value(tag_handle, "TAG_NAME", value)
return value return value