apache / apache/superset

GET /api/v1/dashboard/{pk}/filter_state/{key} does not return "name" property

Closed
#36,053 9 comments 0 reactions 0 assignees View on GitHub
api:dashboard
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 7h
Merged PRs (30d)
692

Description

### Bug description

There seems to be a bug with GET /api/v1/dashboard/{pk}/filter_state/{key} route in the API.

When i fire the API request for the first time i do not get "name" property in the response for applied filter state.

For some reason if i do a random change in current filters(for an example just add a random divider) the same filter state key shows me the name parameter in the API response.

Happens with master from 4th of november.

### Screenshots/recordings

_No response_

### Superset version

master / latest-dev

### Python version

3.9

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing GET /api/v1/dashboard/{pk}/filter_state/{key} on the master/latest-dev version with an initially applied filter state, then trace the endpoint's implementation. Done means the first response includes the "name" property consistently, with a regression test covering the initial request and the response shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.