Skip to content

Guard against users with no profile - #1378

Open
ioan-alexandra wants to merge 1 commit into
ElixirTeSS:masterfrom
ioan-alexandra:fix/user-missing-profile-nil-guard
Open

ioan-alexandra wants to merge 1 commit into
ElixirTeSS:masterfrom
ioan-alexandra:fix/user-missing-profile-nil-guard

Conversation

@ioan-alexandra

@ioan-alexandra ioan-alexandra commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary
Builds a profile if one doesnt exist. Checked production: 6 existing accounts (created between 2023-04-25 and 2023-12-12, none since) have no profile row, so this is a historical gap rather than an ongoing issue.

Motivation and context

Have been getting some 500 errors for user accounts that have no associated Profile. Views and check_profile_id assume @user.profile always exists, but nothing enforces that at the DB level.

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

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.

1 participant