1
0
mirror of https://github.com/immich-app/immich.git synced 2025-02-15 19:36:04 +02:00

fix(web): cannot edit bulk metadata (#5543)

This commit is contained in:
Alex 2023-12-07 17:21:51 -06:00 committed by GitHub
parent 68d467f0e9
commit e4b24b6e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,9 +214,10 @@ export const getAssetType = (type: AssetTypeEnum) => {
export const getSelectedAssets = (assets: Set<AssetResponseDto>, user: UserResponseDto | null): string[] => {
const ids = Array.from(assets)
.filter((a) => !a.isExternal && user && a.ownerId !== user.id)
.filter((a) => !a.isExternal && user && a.ownerId === user.id)
.map((a) => a.id);
const numberOfIssues = Array.from(assets).filter((a) => a.isExternal || (user && a.ownerId === user.id)).length;
const numberOfIssues = Array.from(assets).filter((a) => a.isExternal || (user && a.ownerId !== user.id)).length;
if (numberOfIssues > 0) {
notificationController.show({
message: `Can't change metadata of ${numberOfIssues} asset${numberOfIssues > 1 ? 's' : ''}`,