mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: fix unshared items display
This commit is contained in:
		| @@ -50,7 +50,7 @@ describe('ObjectNamePipe', () => { | ||||
|     }) | ||||
|   }) | ||||
|  | ||||
|   it('should return empty string if object not found', (done) => { | ||||
|   it('should return Private string if object not found', (done) => { | ||||
|     const mockObjects = { | ||||
|       results: [{ id: 2, name: 'Object 2' }], | ||||
|       count: 1, | ||||
| @@ -60,7 +60,7 @@ describe('ObjectNamePipe', () => { | ||||
|     jest.spyOn(objectService, 'listAll').mockReturnValue(of(mockObjects)) | ||||
|  | ||||
|     pipe.transform(1).subscribe((result) => { | ||||
|       expect(result).toBe('') | ||||
|       expect(result).toBe('Private') | ||||
|       done() | ||||
|     }) | ||||
|   }) | ||||
|   | ||||
| @@ -35,7 +35,10 @@ export abstract class ObjectNamePipe implements PipeTransform { | ||||
|       return this.objectService.listAll().pipe( | ||||
|         map((objects) => { | ||||
|           this.objects = objects.results | ||||
|           return this.objects.find((o) => o.id === obejctId)?.name || '' | ||||
|           return ( | ||||
|             this.objects.find((o) => o.id === obejctId)?.name || | ||||
|             $localize`Private` | ||||
|           ) | ||||
|         }), | ||||
|         catchError(() => of('')) | ||||
|       ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon