Skip to content

Commit

Permalink
LINT
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Oct 28, 2024
1 parent b22f8d6 commit c10b9ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion posthog/api/signup.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def create(self, validated_data, **kwargs):
except OrganizationInvite.DoesNotExist:
raise serializers.ValidationError("The provided invite ID is not valid.")

if OrganizationDomain.objects.get_sso_enforcement_for_email_address(invite.target_email):
if invite.target_email and OrganizationDomain.objects.get_sso_enforcement_for_email_address(
invite.target_email
):
raise serializers.ValidationError(
"Sign up with a password is disabled because SSO login is enforced for this domain. Please log in with your SSO credentials.",
code="sso_enforced",
Expand Down

0 comments on commit c10b9ff

Please sign in to comment.