fix item creating with ean13 parent codes

master
Lauren Liberda 2021-07-24 17:01:11 +02:00
parent e52ae61590
commit 948396662b
2 changed files with 2 additions and 2 deletions

View File

@ -12,5 +12,5 @@ export class NewItemInput {
notes?: string;
@Field((type) => ID, { nullable: true })
parent?: number;
parent?: string;
}

View File

@ -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,
});