diff --git a/api/mysagw/oidc_auth/models.py b/api/mysagw/oidc_auth/models.py index 82134de5..6a07972d 100644 --- a/api/mysagw/oidc_auth/models.py +++ b/api/mysagw/oidc_auth/models.py @@ -88,7 +88,7 @@ def _update_or_create_identity(self): ]: return None try: - identity = Identity.objects.get( + identity = Identity.objects.filter(is_organisation=False).get( Q(idp_id=self.id) | Q(email__iexact=self.email), ) # we only want to save if necessary in order to prevent adding historical