Skip to content

Commit

Permalink
use ' not (staffSuppress=='true' and discoverySuppress=='true')'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro-Melnyshyn committed Oct 9, 2024
1 parent 859f3ac commit 410df8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useValidation/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useValidation/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")'),
}),
});
});
Expand Down

0 comments on commit 410df8a

Please sign in to comment.