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: Handle None identity providers in _user_has_social_auth_record #36186

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

sameeramin
Copy link
Contributor

Description

Added safety checks to handle cases where third_party_auth.provider.Registry.get()
returns None, preventing AttributeError when accessing backend_name. The function
now skips invalid providers and only performs the database query when valid
backend names are found.

Supporting information

Link to Jira Ticket: https://2u-internal.atlassian.net/jira/software/c/projects/ENT/boards/868?selectedIssue=ENT-9870

Copy link
Member

@sameenfatima78 sameenfatima78 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. Just make sure to add/modify existing unit tests to capture this change.

@sameeramin sameeramin merged commit c7c9681 into master Jan 31, 2025
49 checks passed
@sameeramin sameeramin deleted the sameeramin/ENT-9870 branch January 31, 2025 09:06
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

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.

4 participants