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 n+1 query in clients #1698

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Fix n+1 query in clients #1698

merged 1 commit into from
Mar 12, 2024

Conversation

apoorv1316
Copy link
Collaborator

No description provided.

@@ -23,9 +23,9 @@ def process

def clients_list
if query.present?
search_clients(search_term, where_clause)
search_clients(search_term, where_clause).includes(:logo_attachment)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also assign this to list variable & return list.includes(:logo_attachment)

@apoorv1316 apoorv1316 merged commit 2051a26 into develop Mar 12, 2024
1 check passed
@apoorv1316 apoorv1316 deleted the fix-n+1-clients-search branch March 12, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants