# 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) |
||
|---|---|---|
| .. | ||
| api_helpers | ||
| constants | ||
| custom_celery_tasks | ||
| exceptions | ||
| insight_log | ||
| jinja_templater | ||
| oncall_gateway | ||
| recaptcha | ||
| tests | ||
| __init__.py | ||
| admin.py | ||
| database.py | ||
| public_primary_keys.py | ||
| timezones.py | ||
| utils.py | ||