massenergize / api

Backend Code for Massenergize Portal. This provides the API to the backend database, and is shared by the various front-end portal projects.
MIT License
5 stars 9 forks source link

Fix: Users List Filter in Admin Portal #1182

Open abdullai-t opened 1 month ago

abdullai-t commented 1 month ago

Summary / Highlights

This pull request fixes the filter functionality of the users list on the admin portal, which was broken due to the joint query in the get_users_filter_params function. The issue arose from attempting to filter users by both community name and community ID within the same query. This PR resolves the issue by splitting the filters into two separate checks: one for community name and one for community ID.

Works with Admin PR

Details (Give details about what this PR accomplishes, include any screenshots, etc)

Testing Steps (Provide details on how your changes can be tested)

run make test

Requirements (place an x in each [ ])

Transparency (Project board)
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 98.43750% with 2 lines in your changes missing coverage. Please review.

Project coverage is 57.27%. Comparing base (a55e76e) to head (cca8888).

Files with missing lines Patch % Lines
src/api/utils/filter_functions.py 71.42% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1182 +/- ## ========================================== + Coverage 57.18% 57.27% +0.08% ========================================== Files 486 486 Lines 35792 35916 +124 ========================================== + Hits 20468 20571 +103 - Misses 15324 15345 +21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.