mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	fix(web): cannot edit bulk metadata (#5543)
This commit is contained in:
		
							parent
							
								
									68d467f0e9
								
							
						
					
					
						commit
						e4b24b6e04
					
				@ -214,9 +214,10 @@ export const getAssetType = (type: AssetTypeEnum) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export const getSelectedAssets = (assets: Set<AssetResponseDto>, user: UserResponseDto | null): string[] => {
 | 
					export const getSelectedAssets = (assets: Set<AssetResponseDto>, user: UserResponseDto | null): string[] => {
 | 
				
			||||||
  const ids = Array.from(assets)
 | 
					  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);
 | 
					    .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) {
 | 
					  if (numberOfIssues > 0) {
 | 
				
			||||||
    notificationController.show({
 | 
					    notificationController.show({
 | 
				
			||||||
      message: `Can't change metadata of ${numberOfIssues} asset${numberOfIssues > 1 ? 's' : ''}`,
 | 
					      message: `Can't change metadata of ${numberOfIssues} asset${numberOfIssues > 1 ? 's' : ''}`,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user