Skip to content

fix: adjust sponsor get function validation, set initial company id#794

Merged
smarcet merged 1 commit intomasterfrom
fix/sponsor-user-request-company-id
Feb 18, 2026
Merged

fix: adjust sponsor get function validation, set initial company id#794
smarcet merged 1 commit intomasterfrom
fix/sponsor-user-request-company-id

Conversation

@tomrndom
Copy link

@tomrndom tomrndom commented Feb 17, 2026

ref: https://app.clickup.com/t/86b8j79ed

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved data handling for sponsor company information to prevent errors when data is missing.
    • Enhanced performance by reducing unnecessary data fetches during sponsor request processing.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@tomrndom tomrndom requested a review from smarcet February 17, 2026 19:17
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Two files in the sponsor request management feature are modified: one ensures company ID defaults to 0 in initial form values when undefined, the other adds a conditional check to prevent fetching sponsor data when company ID is absent.

Changes

Cohort / File(s) Summary
Sponsor Request Form/Popup
src/pages/sponsors/sponsor-users-list-page/components/process-request-form.js, src/pages/sponsors/sponsor-users-list-page/components/process-request-popup.js
Default company.id to 0 when null/undefined in initial values; guard fetchSponsorByCompany execution to only run when request.company_id is truthy.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • smarcet

Poem

🐰 A sponsor form hops with graceful care,
Defaulting IDs to zero, null beyond repair,
Conditional fetches skip the empty air,
No undefined shadows in the sponsor's lair! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adjusting sponsor function validation and setting initial company id defaults.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/sponsor-user-request-company-id

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@smarcet smarcet left a comment

Choose a reason for hiding this comment

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

LGTM

@smarcet smarcet merged commit df8ea7f into master Feb 18, 2026
9 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.

2 participants

Comments