diff --git a/src/items/dto/new-item.input.ts b/src/items/dto/new-item.input.ts index 75c00b4..b1f0a2f 100644 --- a/src/items/dto/new-item.input.ts +++ b/src/items/dto/new-item.input.ts @@ -12,5 +12,5 @@ export class NewItemInput { notes?: string; @Field((type) => ID, { nullable: true }) - parent?: number; + parent?: string; } diff --git a/src/items/items.service.ts b/src/items/items.service.ts index 7fea028..ca100e1 100644 --- a/src/items/items.service.ts +++ b/src/items/items.service.ts @@ -104,7 +104,7 @@ export class ItemsService { : // @ts-ignore input.id must exist here this.eans.toID(input.id), parent: input.parent - ? await this.itemRepository.findOneOrFail(input.parent) + ? await this.itemRepository.findOneOrFail(this.eans.toID(input.parent)) : undefined, });