diff --git a/src/controllers/ProfileChangeNameController.ts b/src/controllers/ProfileChangeNameController.ts index 0261666f..3f61301f 100644 --- a/src/controllers/ProfileChangeNameController.ts +++ b/src/controllers/ProfileChangeNameController.ts @@ -114,6 +114,7 @@ export class ProfileChangeNameController extends Controller { profile.prefix = body.prefix ?? profile.prefix; profile.rank = body.rank ?? profile.rank; profile.prefixMain = profile.rank ?? profile.prefix; + await this.profileRepository.save(profile, { data: req }); setLogDataDiff(req, { before, after: profile }); diff --git a/src/services/rabbitmq.ts b/src/services/rabbitmq.ts index 8ab9d22f..b941ad13 100644 --- a/src/services/rabbitmq.ts +++ b/src/services/rabbitmq.ts @@ -904,7 +904,7 @@ async function handler_org(msg: amqp.ConsumeMessage): Promise { posType: posTypeName, posLevel: posLevelName, posExecutive: posExecutiveName, - profileId: _null, + profileId: nextHolderProfile?.id || _null, rootDnaId: item.orgRoot?.ancestorDNA || _null, child1DnaId: item.orgChild1?.ancestorDNA || _null, child2DnaId: item.orgChild2?.ancestorDNA || _null,