mirror of
https://github.com/immich-app/immich.git
synced 2024-11-16 02:18:50 -07:00
chore(server): Image description disappears after toggle favorite (#3009)
* Fixed asset rewrite description on toggle favorite * Fixed description removing error * Rewrite description condition for asset update --------- Co-authored-by: Balazs Keszei <balazs.keszei@clbr.hu>
This commit is contained in:
parent
b4e641548c
commit
6ae5d11ec0
@ -260,11 +260,15 @@ export class AssetRepository implements IAssetRepository {
|
||||
asset.isArchived = dto.isArchived ?? asset.isArchived;
|
||||
|
||||
if (asset.exifInfo != null) {
|
||||
asset.exifInfo.description = dto.description || '';
|
||||
if (dto.description !== undefined) {
|
||||
asset.exifInfo.description = dto.description;
|
||||
}
|
||||
await this.exifRepository.save(asset.exifInfo);
|
||||
} else {
|
||||
const exifInfo = new ExifEntity();
|
||||
exifInfo.description = dto.description || '';
|
||||
if (dto.description !== undefined) {
|
||||
exifInfo.description = dto.description;
|
||||
}
|
||||
exifInfo.asset = asset;
|
||||
await this.exifRepository.save(exifInfo);
|
||||
asset.exifInfo = exifInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user