Skip to content

Commit

Permalink
Reverse change for looking at all publishing sub-resourcews when find…
Browse files Browse the repository at this point in the history
…ing children
  • Loading branch information
silverbackdan committed Sep 23, 2024
1 parent 6485356 commit 27ca83c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/runtime/admin/manageable-resource.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ describe('ManageableResource Class', () => {

vi.spyOn($cwa, 'resources', 'get').mockImplementation(() => {
return {
getResource,
findAllPublishableIris: vi.fn(iri => ([iri]))
getResource
}
})
vi.spyOn(ResourceUtils, 'getResourceTypeFromIri').mockImplementation((iri) => {
Expand Down
7 changes: 2 additions & 5 deletions src/runtime/admin/manageable-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,8 @@ export default class ManageableResource {
}

for (const child of children) {
const allPublishableIrisOfChildren = this.$cwa.resources.findAllPublishableIris(child)
for (const childIri of allPublishableIrisOfChildren) {
nested.push(childIri)
nested.push(...getNestedChildren(childIri))
}
nested.push(child)
nested.push(...getNestedChildren(child))
}
}

Expand Down

0 comments on commit 27ca83c

Please sign in to comment.