File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
gramps_webapi/api/resources Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 3636from ...const import PRIMARY_GRAMPS_OBJECTS
3737from ..auth import has_permissions , require_permissions
3838from ..search import (
39- get_search_indexer ,
40- get_semantic_search_indexer ,
4139 SearchIndexer ,
4240 SemanticSearchIndexer ,
41+ get_search_indexer ,
42+ get_semantic_search_indexer ,
4343)
4444from ..tasks import (
4545 AsyncResult ,
@@ -82,6 +82,8 @@ def get_object_from_handle(
8282 query_method = self .db_handle .method ("get_%s_from_handle" , class_name )
8383 assert query_method is not None # type checker
8484 obj = query_method (handle )
85+ if obj is None :
86+ raise HandleError (f"Object not found for handle { handle } " )
8587 if "profile" in args :
8688 if class_name == "person" :
8789 obj .profile = get_person_profile_for_object (
You can’t perform that action at this time.
0 commit comments