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

EREGCSC-2901 Fix for "Subject counts include unapproved items" #1493

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

cgodwin1
Copy link
Contributor

@cgodwin1 cgodwin1 commented Dec 2, 2024

Resolves #2901

Note:

Failing CDK deployments are not relevant to this bugfix, please ignore them as long as other tests and deployment steps are passing.

Description-

Bug discovered in /v3/resources/subjects where the public_resources and internal_resources fields included unapproved resources in their counts.

This pull request changes...

  • Added an approved filter to the existing counts
  • Added a test case for this endpoint

Steps to manually verify this change...

  1. Unit tests pass
  2. Go to the experimental subjects endpoint and note in the first result, "Aged, Blind, Disabled", the public_resources count is 42.
  3. Go to this resource in the admin panel and uncheck "Approved" and save.
  4. Go back to the subjects endpoint page above and refresh. The public_resources count under "Aged, Blind, Disabled" should drop to 41.

Copy link

github-actions bot commented Dec 2, 2024

✨ See the Django Site in action

@cgodwin1 cgodwin1 marked this pull request as ready for review December 2, 2024 20:34
@cgodwin1 cgodwin1 requested a review from PhilR8 as a code owner December 2, 2024 20:34
@cgodwin1 cgodwin1 added the Needs Review This PR needs a code review label Dec 2, 2024
Copy link
Contributor

@PhilR8 PhilR8 left a comment

Choose a reason for hiding this comment

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

LGTM!

@PhilR8 PhilR8 added Approved and removed Needs Review This PR needs a code review labels Dec 2, 2024
@cgodwin1 cgodwin1 merged commit 2b52ab8 into main Dec 3, 2024
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants