Skip to content

Commit a099298

Browse files
committed
Add trigger_django_object_does_not_exist
1 parent 8cff015 commit a099298

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

styleguide_example/errors/services.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
from django.core.exceptions import (
55
ValidationError as DjangoValidationError,
6-
PermissionDenied
6+
PermissionDenied,
7+
ObjectDoesNotExist
78
)
89
from django.http import Http404
910

@@ -33,6 +34,10 @@ def trigger_django_permission_denied():
3334
raise PermissionDenied()
3435

3536

37+
def trigger_django_object_does_not_exist():
38+
raise ObjectDoesNotExist()
39+
40+
3641
def trigger_django_404():
3742
raise Http404()
3843

0 commit comments

Comments
 (0)