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

Filter out those facilities that are already linked to user #1588

Merged
merged 18 commits into from
Oct 30, 2023

Conversation

Pranshu1902
Copy link
Contributor

Proposed Changes

  • Filter out those facilities that are already linked to the user. When the Link Facility page makes a call to the backend, if the username is passed then the backend will filter out those facilities that are already linked.

Associated Issue

Fixes #1581

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

@nihal467
Copy link
Member

nihal467 commented Oct 3, 2023

@Pranshu1902 fix the failed test

care/facility/api/viewsets/facility.py Outdated Show resolved Hide resolved
care/facility/api/viewsets/facility.py Outdated Show resolved Hide resolved
care/facility/tests/test_facilityuser_api.py Outdated Show resolved Hide resolved
@nihal467
Copy link
Member

nihal467 commented Oct 8, 2023

@Pranshu1902 the test is still failing

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (5dff7a0) 59.44% compared to head (81ea749) 60.01%.
Report is 8 commits behind head on master.

❗ Current head 81ea749 differs from pull request most recent head 09792a2. Consider uploading reports for the commit 09792a2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1588      +/-   ##
==========================================
+ Coverage   59.44%   60.01%   +0.57%     
==========================================
  Files         208      208              
  Lines       11278    11330      +52     
  Branches     1597     1608      +11     
==========================================
+ Hits         6704     6800      +96     
+ Misses       4372     4305      -67     
- Partials      202      225      +23     
Files Coverage Δ
care/facility/api/viewsets/facility.py 61.94% <54.54%> (-0.80%) ⬇️

... and 17 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nihal467
Copy link
Member

@sainak review the backend, the functionality looks good to me

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

@Pranshu1902 are you sure pre-commit lint is working fine in your local?

Check the lint CI

@nihal467
Copy link
Member

nihal467 commented Oct 25, 2023

tested locally, looks good to me @vigneshhari can you review it

@vigneshhari vigneshhari merged commit 5428d66 into ohcnetwork:master Oct 30, 2023
3 checks passed
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.

Don't show already Linked Facilities on Link New Facility on User page
5 participants