Skip to content

Fix 500 when creating text widgets without visualization_id - #7796

Open
amirshahzadhashmi7145 wants to merge 2 commits into
getredash:masterfrom
amirshahzadhashmi7145:fix/7793-text-widget-missing-visualization-id
Open

amirshahzadhashmi7145 wants to merge 2 commits into
getredash:masterfrom
amirshahzadhashmi7145:fix/7793-text-widget-missing-visualization-id

Conversation

@amirshahzadhashmi7145

@amirshahzadhashmi7145 amirshahzadhashmi7145 commented Sep 3, 2026 •

Copy link
Copy Markdown

Summary

Test plan

  • POST /api/widgets with {dashboard_id, width, text} (no visualization_id) returns 200
  • Same request with "visualization_id": null still returns 200
  • Creating a visualization widget still works

Review in cubic

@greptile-apps

greptile-apps Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Allows text widgets to be created without a visualization.

The PR appears safe to merge.

Summary

The PR allows text widgets to be created when visualization_id is omitted rather than explicitly set to null.

  • Defaults a missing visualization_id to None in the widget creation handler.
  • Adds API coverage for creating a text widget without the key.

Reviews (4) · Last reviewed commit: "Merge branch 'master' into fix/7793-text..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@amirshahzadhashmi7145
amirshahzadhashmi7145 force-pushed the fix/7793-text-widget-missing-visualization-id branch from a221ffa to 365d5ef Compare September 3, 2026 12:33
POST /api/widgets treated a missing visualization_id as a KeyError instead of a text widget.

Co-authored-by: Cursor <cursoragent@cursor.com>
@amirshahzadhashmi7145
amirshahzadhashmi7145 force-pushed the fix/7793-text-widget-missing-visualization-id branch from 365d5ef to 7bd1f33 Compare September 6, 2026 20:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WidgetListResource.post() raises unhandled KeyError (500) when visualization_id is omitted for text widgets

1 participant