Skip to content

fix: user settings PATCH treats null body values as field omission#842

Open
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:#818
Open

fix: user settings PATCH treats null body values as field omission#842
tmdeveloper007 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
tmdeveloper007:#818

Conversation

@tmdeveloper007
Copy link
Copy Markdown
Contributor

fix: user settings PATCH treats null body values as field omission

@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

@TESTPERSONAL is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts) labels May 23, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@tmdeveloper007 tmdeveloper007 force-pushed the #818 branch 4 times, most recently from a3ffd70 to 68d0a46 Compare May 23, 2026 06:40
Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

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

Two issues:

  1. Missing EOF newline on e2e/landing.spec.js.

  2. Null allowed into boolean field: Changing guards from typeof is_public === 'boolean' to is_public !== undefined allows { is_public: null } through — null will be assigned to a typed boolean column. Change to is_public !== undefined && is_public !== null to properly handle field omission vs explicit null.

@Priyanshu-byte-coder
Copy link
Copy Markdown
Owner

Three issues block this merge:

1. !== undefined check is too permissive
Changing typeof is_public === "boolean" to is_public !== undefined means is_public: null or is_public: 1 would pass through and be written to the DB. The strict typeof === "boolean" check is intentional — please revert those changes.

Same problem with pinned_repos: replacing Array.isArray() with !== undefined means a string value like pinned_repos: "foo" would pass the if (pinned_repos !== undefined) check, and then pinned_repos.length would measure string length instead of array length.

2. Merge conflict
This PR conflicts with current main (settings/route.ts was updated by a recently merged PR). Please rebase on main.

3. Missing EOF newline in e2e/landing.spec.js
The diff shows the trailing newline removed. Please restore it.

@Priyanshu-byte-coder Priyanshu-byte-coder added gssoc:approved GSSoC: PR approved for scoring level:intermediate GSSoC: Intermediate difficulty (35 pts) labels May 23, 2026
@tmdeveloper007 tmdeveloper007 force-pushed the #818 branch 2 times, most recently from 500ae7b to 246b18a Compare May 23, 2026 14:52
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@tmdeveloper007
Copy link
Copy Markdown
Contributor Author

This pull request is fully up-to-date with the latest upstream merges, all review items are addressed, local tests are passing cleanly, and it is fully ready to be merged! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC: PR approved for scoring gssoc26 GSSoC 2026 contribution level:intermediate GSSoC: Intermediate difficulty (35 pts) type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants