Skip to content

Commit

Permalink
Merge branch 'master' into spacing-between-cols-in-incident-details
Browse files Browse the repository at this point in the history
  • Loading branch information
podliashanyk authored Jan 24, 2025
2 parents 9bc4ec7 + 7564dae commit ffba88c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
exclude: &exclude_pattern '^changelog.d/'
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
rev: v0.9.3
hooks:
# Run the linter
- id: ruff
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1147.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show relevant error message on destination delete by passing the original exception message to the UI.
4 changes: 2 additions & 2 deletions src/argus/htmx/destination/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def delete_htmx(request, pk: int) -> HttpResponse:
try:
medium = api_safely_get_medium_object(destination.media.slug)
medium.raise_if_not_deletable(destination)
except NotificationMedium.NotDeletableError:
error_msg = "That destination cannot be deleted."
except NotificationMedium.NotDeletableError as e:
error_msg = " ".join(e.args)
else:
destination.delete()

Expand Down

0 comments on commit ffba88c

Please sign in to comment.