d9k opened a new issue, #20991:
URL: https://github.com/apache/superset/issues/20991
#### How to reproduce the bug
`superset_config_docker.py`:
```
def filter_value_first(
self, column: str, default = None, remove_filter: bool = False
):
return self.filter_values(column, default, remove_filter)[0]
JINJA_CONTEXT_ADDONS = {
"filter_value_first": filter_value_first,
}
```
sql query template:
```
{% set val = filter_value_first('my_filter') %}
```
### Expected results
`filter_value_first` returns first value from filter.
### Actual results
Error:
```
filter_value_first() missing 1 required positional argument: 'column'
```
### Environment
(please complete the following information):
- superset version: `1.5.0rc4`
### Additional context
So I can't use `self` argument.
How can I get existing jinja template processor object in `my
filter_value_first()` function?
--
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]