fix: relation error if not exist
This commit is contained in:
parent
cc430a1a38
commit
fa62ebe2f0
1 changed files with 1 additions and 1 deletions
|
|
@ -336,7 +336,7 @@ export class ProfileFamilyHistoryController extends Controller {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
...childrenRecord.map(async (v) => {
|
...childrenRecord.map(async (v) => {
|
||||||
if (!children.find((x) => x.id === v.id)) {
|
if (children.find((x) => x.id === v.id)) {
|
||||||
return await this.childrenHistoryRepo.save(
|
return await this.childrenHistoryRepo.save(
|
||||||
this.childrenHistoryRepo.create({
|
this.childrenHistoryRepo.create({
|
||||||
...v,
|
...v,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue