bito-code-review[bot] commented on PR #40980:
URL: https://github.com/apache/superset/pull/40980#issuecomment-4683875166
<!-- Bito Reply -->
The reported issue is correct. The `_escape_like` function expects a string,
but `ReportScheduleAllTextFilter.apply` passes the raw `value` from the filter,
which can be a non-string type (e.g., an integer). Calling `.replace()` on a
non-string type raises an `AttributeError`.
To resolve this, you should coerce the `value` to a string before passing it
to `_escape_like` in `superset/reports/filters.py`.
**superset/reports/filters.py**
```
if not value:
return query
ilike_value = f"%{_escape_like(str(value))}%"
return query.filter(
or_(
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]