1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

fix(web): merging people when renaming (#6608)

fix: merging people when renaming
This commit is contained in:
martin 2024-01-24 06:26:40 +01:00 committed by GitHub
parent 3ae10c75fb
commit 965281346f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,15 +162,15 @@
}
try {
await api.personApi.mergePerson({
id: personMerge2.id,
id: personToBeMergedIn.id,
mergePersonDto: { ids: [personToMerge.id] },
});
const { data: mergedPerson } = await api.personApi.getPerson({ id: personToMerge.id });
const { data: mergedPerson } = await api.personApi.getPerson({ id: personToBeMergedIn.id });
countVisiblePeople--;
people = people.filter((person: PersonResponseDto) => person.id !== personToMerge.id);
people = people.map((person: PersonResponseDto) => (person.id === personMerge2.id ? mergedPerson : person));
people = people.map((person: PersonResponseDto) => (person.id === personToBeMergedIn.id ? mergedPerson : person));
notificationController.show({
message: 'Merge people succesfully',