fix: Allow DataAccessorBasedStore to create root

This commit is contained in:
Joachim Van Herwegen
2020-12-14 13:44:37 +01:00
parent 209b87a424
commit a08b7e9112
2 changed files with 17 additions and 1 deletions

View File

@@ -218,7 +218,8 @@ export class DataAccessorBasedStore implements ResourceStore {
await this.handleContainerData(representation);
}
if (createContainers) {
// Root container should not have a parent container
if (createContainers && !this.identifierStrategy.isRootContainer(identifier)) {
await this.createRecursiveContainers(this.identifierStrategy.getParentContainer(identifier));
}