FieldError: Unsupported lookup 'icontains' for OneToOneField or join on the field not permitted.
Closed this issue · 0 comments
sentry-io commented
Use a specific sub-field on the user model, such as user__email instead of searching directly against the user field on the subscription object.
Sentry Issue: WESTERNFRIEND-WEBSITE-NV
FieldError: Unsupported lookup 'icontains' for OneToOneField or join on the field not permitted.
(18 additional frame(s) were not displayed)
...
File "django/db/models/sql/query.py", line 1459, in build_filter
return self._add_q(
File "django/db/models/sql/query.py", line 1632, in _add_q
child_clause, needed_inner = self.build_filter(
File "django/db/models/sql/query.py", line 1546, in build_filter
condition = self.build_lookup(lookups, col, value)
File "django/db/models/sql/query.py", line 1370, in build_lookup
lhs = self.try_transform(lhs, lookup_name)
File "django/db/models/sql/query.py", line 1414, in try_transform
raise FieldError(