Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/sentry/api/serializers/rest_framework/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,19 @@ def update_widgets(self, instance, widget_data):
# Create a new widget.
self.create_widget(instance, data)
else:
sentry_sdk.set_context(
"dashboard",
{
"org_slug": instance.organization.slug,
"dashboard_id": instance.id,
"widget_id": widget_id,
"existing_widget_ids": list(existing_map.keys()),
"requested_widget_ids": widget_ids,
},
)
sentry_sdk.capture_message(
"Attempted to update widget not belonging to dashboard."
)
raise serializers.ValidationError(
"You cannot update widgets that are not part of this dashboard."
)
Expand Down
Loading