Skip to content

LG-16340: Make sure to not expect an empty profile. #12270

Merged
mdiarra3 merged 2 commits intomainfrom
dont-try-with-empty-profiles
Jun 30, 2025
Merged

LG-16340: Make sure to not expect an empty profile. #12270
mdiarra3 merged 2 commits intomainfrom
dont-try-with-empty-profiles

Conversation

@mdiarra3
Copy link
Contributor

🎫 Ticket

Link to the relevant ticket:
LG-16340

🛠 Summary of changes

This ensures that when a user does not have an active profile we don't return anything for that particular user.

@mdiarra3 mdiarra3 requested a review from a team June 17, 2025 17:22
Copy link
Contributor

@kevinsmaster5 kevinsmaster5 left a comment

Choose a reason for hiding this comment

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

Looks good.
Manually tested locally and can confirm no more error having replicated the error on Main.

profile = current_user&.active_profile
DuplicateProfileConfirmation.where(
profile_id: profile.id,
profile_id: profile&.id,
Copy link
Contributor

@mitchellhenke mitchellhenke Jun 23, 2025

Choose a reason for hiding this comment

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

Suggested change
profile_id: profile&.id,
profile_id: profile.id,

This column can't be null, so could probably return false if profile is nil above this.

@mdiarra3 mdiarra3 merged commit e6a9857 into main Jun 30, 2025
1 check passed
@mdiarra3 mdiarra3 deleted the dont-try-with-empty-profiles branch June 30, 2025 17:08
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.

3 participants