Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

case insensitive attribute mapping #971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BitPatty
Copy link

@BitPatty BitPatty commented Mar 23, 2024

Fixes an issue ( see #900 and #974 ) where attributes with uppercase characters would be filtered out in the response due to the lowercase matching in the search response:

Object.keys(entry.attributes).forEach(function (a) {
const _a = a.toLowerCase()
if (!nofiltering && _a.length && _a[0] === '_') {
savedAttrs[a] = entry.attributes[a]
delete entry.attributes[a]
} else if (!nofiltering && self.notAttributes.indexOf(_a) !== -1) {
savedAttrs[a] = entry.attributes[a]
delete entry.attributes[a]
} else if (all) {
// do nothing
} else if (self.attributes.length && self.attributes.indexOf(_a) === -1) {
savedAttrs[a] = entry.attributes[a]
delete entry.attributes[a]
}
})

@BitPatty BitPatty changed the title fix #900 fix #900 and #974 Apr 18, 2024
@BitPatty BitPatty changed the title fix #900 and #974 case insensitive attribute mapping Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant