-
Notifications
You must be signed in to change notification settings - Fork 15.4k
fix: bug when updating dashboard #34193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: bug when updating dashboard #34193
Conversation
This reverts commit 35aaeb6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Missing Null Check in Tag Filtering ▹ view | ✅ Fix detected |
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/src/dashboard/components/Header/index.jsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
@@ -415,7 +415,7 @@ const Header = () => { | |||
owners: dashboardInfo.owners, | |||
roles: dashboardInfo.roles, | |||
slug, | |||
tags: dashboardInfo.tags, | |||
tags: dashboardInfo.tags.filter(item => item.type === 1 || !item.type), |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -415,7 +415,9 @@ const Header = () => { | |||
owners: dashboardInfo.owners, | |||
roles: dashboardInfo.roles, | |||
slug, | |||
tags: dashboardInfo.tags, | |||
tags: (dashboardInfo.tags || []).filter( | |||
item => item.type === 1 || !item.type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have some sort of enum/constant anywhere on the frontend that properly labels what TagType == 1 means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found it on the backend -> https://github.com/apache/superset/blob/master/superset/tags/models.py#L61-L77 but couldn't find it on the frontend. Maybe we need a corresponding enum on the frontend if we don't have one already ... hoping we don't hard-code meaningless values related to TagType in other places in the frontend...
Nice, great improvement! You should install Oh looks like npm was down/strugglnig and failed |
@mistercrunch CI is passing if this looks good to ya otherwise :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for improving the types on the frontend!
This PR fix bag after #34147
To reproduce the error

, you need to try changing the dashboard with the owner assigned to the dashboard, and the dashboard should not contain any tags attached.
When receiving data about the dashboard, information is received about related tags whose type is not custom_tag
To fix the dashboard saving error, a filter for tags has been added
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION