fix item creating with ean13 parent codes
parent
e52ae61590
commit
948396662b
|
@ -12,5 +12,5 @@ export class NewItemInput {
|
|||
notes?: string;
|
||||
|
||||
@Field((type) => ID, { nullable: true })
|
||||
parent?: number;
|
||||
parent?: string;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue