260318:1401 Fix UUID #05
Build and Deploy / deploy (push) Failing after 11m8s

This commit is contained in:
admin
2026-03-18 14:01:32 +07:00
parent ba642e7e42
commit e5769269a8
37 changed files with 460 additions and 328 deletions
@@ -423,8 +423,9 @@ export class CorrespondenceService {
async addReference(id: number, dto: AddReferenceDto) {
const source = await this.correspondenceRepo.findOne({ where: { id } });
// ADR-019: Resolve target UUID → internal INT id
const target = await this.correspondenceRepo.findOne({
where: { id: dto.targetId },
where: { uuid: dto.targetUuid },
});
if (!source || !target) {
@@ -438,7 +439,7 @@ export class CorrespondenceService {
const exists = await this.referenceRepo.findOne({
where: {
sourceId: id,
targetId: dto.targetId,
targetId: target.id,
},
});
@@ -448,7 +449,7 @@ export class CorrespondenceService {
const ref = this.referenceRepo.create({
sourceId: id,
targetId: dto.targetId,
targetId: target.id,
});
return this.referenceRepo.save(ref);