Dashboard › sentry › Sentry UserEmail.objects.get(email__iex…
019d79f0-e3f9-7e37-8432-9e26d8e3e319Multiple Sentry users can share the same email address via UserEmail. Using .get(email__iexact=email) without filtering by user raises MultipleObjectsReturned. Fix: use .filter(email__iexact=email).order_by('-is_verified', 'id').first() to prefer verified emails and get deterministic results. The existing codebase pattern in identity.py always filters by both user and email to avoid this.