Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Email Search): cast iterator to list #21669

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

barredterra
Copy link
Collaborator

@barredterra barredterra commented Jul 13, 2023

The search functionality in the email modal uses the whitelisted method get_contact_list. Currently, in version-13, the search does not work, giving empty search results for valid queries.

Problem

The filter function is used to get rid of any None values in the result. However, it returns a python iterator while the frontend expects a list of dictionaries.

Solution

Cast the iterator to a list. This is already implemented in develop and version-14.

@barredterra barredterra requested review from a team and phot0n and removed request for a team July 13, 2023 15:29
@barredterra
Copy link
Collaborator Author

The sempgrep failure is unrelated to this fix. Removing the filter() altogether is proposed as a part of #20323.

@ankush ankush merged commit 91e96d2 into frappe:version-13-hotfix Jul 13, 2023
9 of 10 checks passed
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 13.58.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@barredterra barredterra deleted the fix-get-contact-list branch July 13, 2023 16:14
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants