Commit 251a0dde authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

fix bug

parent d9298803
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1829,7 +1829,10 @@ def ancestors_from_resource(user: User, resource_id: int) -> List[List[dict]]:
    project = resource_instance.ptr_project
    _check_project_permission(user, project, PERM_COLLECTION_READ)
    for collection_instance in resource_instance.collections.all():
        if collection_instance.project == project:
        if (
            collection_instance.project == project
            and collection_instance.deleted_at is None
        ):
            ancestors.append(
                ancestors_from_collection(
                    user, collection_instance.id, include_self=True