Skip to content

High performance self-hosted photo and video management solution.

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

Alexe4b24b6e04fd
diff --git a/web/src/lib/utils/asset-utils.ts b/web/src/lib/utils/asset-utils.ts
index b466e142cf..e92bf8455a 100644
--- a/web/src/lib/utils/asset-utils.ts
+++ b/web/src/lib/utils/asset-utils.ts
@@ -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' : ''}`,