# What this PR does Sometimes `CustomButtonView` returns HTTP 500 with the following error: ``` apps.alerts.models.custom_button.CustomButton.MultipleObjectsReturned: get() returned more than one CustomButton -- it returned 3! ``` This PR fixes it by adding `.distinct()` to the `CustomButton` queryset when retrieving an instance + does the same for `WebhooksView`. ## Which issue(s) this PR fixes Related to https://github.com/grafana/oncall-private/issues/1828 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) |
||
|---|---|---|
| .. | ||
| permissions | ||
| serializers | ||
| tests | ||
| throttlers | ||
| views | ||
| __init__.py | ||
| response_renderers.py | ||
| urls.py | ||