diff --git a/src/hooks/useValidation/validators.js b/src/hooks/useValidation/validators.js index a74327d1..68c3edb0 100644 --- a/src/hooks/useValidation/validators.js +++ b/src/hooks/useValidation/validators.js @@ -483,7 +483,7 @@ export const validateLccnDuplication = async ({ }; if (marcType === MARC_TYPES.BIB) { - searchParams.query += ' and (staffSuppress=="false" or discoverySuppress=="false")'; + searchParams.query += ' not (staffSuppress=="true" and discoverySuppress=="true")'; } const requests = { diff --git a/src/hooks/useValidation/validators.test.js b/src/hooks/useValidation/validators.test.js index aa53825b..b2df1bfb 100644 --- a/src/hooks/useValidation/validators.test.js +++ b/src/hooks/useValidation/validators.test.js @@ -805,7 +805,7 @@ describe('validators', () => { expect(ky.get).toHaveBeenCalledWith('search/instances', { searchParams: expect.objectContaining({ - query: expect.stringContaining(' and (staffSuppress=="false" or discoverySuppress=="false")'), + query: expect.stringContaining(' not (staffSuppress=="true" and discoverySuppress=="true")'), }), }); });