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: ensure fetchEnterpriseCuration is only called if an enterpriseUUID is present #902

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

adamstankiewicz
Copy link
Member

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

@@ -52,6 +52,10 @@ export const useEnterpriseCuration = (enterpriseUUID) => {
const [fetchError, setFetchError] = useState();

useEffect(() => {
if (!enterpriseUUID) {
Copy link
Member Author

@adamstankiewicz adamstankiewicz Dec 13, 2023

Choose a reason for hiding this comment

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

If enterpriseUUID is not yet present, do nothing instead of calling the enterprise_curations API with undefined as its enterprise UUID, throwing lots of undefined is not a valid uuid errors in enterprise catalog.

Replicated the error locally; this conditional does indeed prevent the call.

Copy link

codecov bot commented Dec 13, 2023

Codecov Report

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

Comparison is base (d36b78a) 84.87% compared to head (2fec7f1) 84.94%.
Report is 102 commits behind head on master.

Files Patch % Lines
src/components/search/Search.jsx 0.00% 29 Missing ⚠️
...ntent/course-enrollments/CourseAssignmentAlert.jsx 27.27% 8 Missing ⚠️
src/components/course/data/hooks.jsx 88.33% 7 Missing ⚠️
...course-enrollments/course-cards/BaseCourseCard.jsx 89.85% 7 Missing ⚠️
src/components/my-career/VisualizeCareer.jsx 74.07% 6 Missing and 1 partial ⚠️
src/components/my-career/data/service.js 56.25% 7 Missing ⚠️
src/components/course/data/utils.jsx 95.89% 6 Missing ⚠️
src/components/my-career/AddJobRole.jsx 60.00% 5 Missing and 1 partial ⚠️
src/components/my-career/data/hooks.jsx 50.00% 6 Missing ⚠️
...rc/components/search/AssignmentsOnlyEmptyState.jsx 0.00% 6 Missing ⚠️
... and 28 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #902      +/-   ##
==========================================
+ Coverage   84.87%   84.94%   +0.07%     
==========================================
  Files         320      338      +18     
  Lines        6399     7081     +682     
  Branches     1552     1732     +180     
==========================================
+ Hits         5431     6015     +584     
- Misses        941     1035      +94     
- Partials       27       31       +4     

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

@adamstankiewicz adamstankiewicz merged commit 81c0a10 into master Dec 13, 2023
6 checks passed
@adamstankiewicz adamstankiewicz deleted the ags/ent-8082-pt2 branch December 13, 2023 20:07
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