fix item creating with ean13 parent codes
This commit is contained in:
parent
e52ae61590
commit
948396662b
|
@ -12,5 +12,5 @@ export class NewItemInput {
|
||||||
notes?: string;
|
notes?: string;
|
||||||
|
|
||||||
@Field((type) => ID, { nullable: true })
|
@Field((type) => ID, { nullable: true })
|
||||||
parent?: number;
|
parent?: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ export class ItemsService {
|
||||||
: // @ts-ignore input.id must exist here
|
: // @ts-ignore input.id must exist here
|
||||||
this.eans.toID(input.id),
|
this.eans.toID(input.id),
|
||||||
parent: input.parent
|
parent: input.parent
|
||||||
? await this.itemRepository.findOneOrFail(input.parent)
|
? await this.itemRepository.findOneOrFail(this.eans.toID(input.parent))
|
||||||
: undefined,
|
: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue