mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 22:23:10 +00:00
Handle case where the filter is manually disabled
This commit is contained in:
parent
bac9e8145e
commit
ad8a5e7634
@ -31,8 +31,12 @@ module.exports = ({ strapi }) => {
|
||||
.hasFiltersEnabeld()
|
||||
);
|
||||
|
||||
const isIDFilterEnabled = extension
|
||||
.shadowCRUD(contentType.uid)
|
||||
.field('id')
|
||||
.hasFiltersEnabeld();
|
||||
// Add an ID filter to the collection types
|
||||
if (contentType.kind === 'collectionType') {
|
||||
if (contentType.kind === 'collectionType' && isIDFilterEnabled) {
|
||||
t.field('id', { type: getScalarFilterInputTypeName('ID') });
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user