# 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) |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| custom_fields.py | ||
| custom_rate_scoped_throttler.py | ||
| exceptions.py | ||
| filters.py | ||
| mixins.py | ||
| optional_slash_router.py | ||
| paginators.py | ||
| utils.py | ||