Skip to content

FieldError when filtering by user email in the OAuthCredentials admin

Sentry Issue: ARKINDEX-BACKEND-1PE

FieldError: Related Field got invalid lookup: icontains
(19 additional frame(s) were not displayed)
...
  File "django/db/models/sql/query.py", line 1562, in _add_q
    child_clause, needed_inner = self.build_filter(
  File "django/db/models/sql/query.py", line 1388, in build_filter
    return self._add_q(
  File "django/db/models/sql/query.py", line 1562, in _add_q
    child_clause, needed_inner = self.build_filter(
  File "django/db/models/sql/query.py", line 1478, in build_filter
    condition = self.build_lookup(lookups, col, value)
  File "django/db/models/sql/query.py", line 1292, in build_lookup
    raise FieldError(

We need to apply the same fix as #964 (closed) to allow searching by user email properly.