fix(server): Allow negative rating (for rejected images) (#15699)

Allow negative rating (for rejected images)
This commit is contained in:
Christian Kündig
2025-01-28 04:54:29 +01:00
committed by GitHub
parent f44669447f
commit fe1e09e51f
7 changed files with 31 additions and 6 deletions

View File

@@ -1162,6 +1162,17 @@ describe(MetadataService.name, () => {
}),
);
});
it('should handle valid negative rating value', async () => {
assetMock.getByIds.mockResolvedValue([assetStub.image]);
mockReadTags({ Rating: -1 });
await sut.handleMetadataExtraction({ id: assetStub.image.id });
expect(assetMock.upsertExif).toHaveBeenCalledWith(
expect.objectContaining({
rating: -1,
}),
);
});
});
describe('handleQueueSidecar', () => {