mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Merge pull request #2679 from anoek/2636
Fixed notification template deleting
This commit is contained in:
@@ -3462,7 +3462,7 @@ class NotificationTemplateDetail(RetrieveUpdateDestroyAPIView):
|
|||||||
if obj.notifications.filter(status='pending').exists():
|
if obj.notifications.filter(status='pending').exists():
|
||||||
return Response({"error": "Delete not allowed while there are pending notifications"},
|
return Response({"error": "Delete not allowed while there are pending notifications"},
|
||||||
status=status.HTTP_405_METHOD_NOT_ALLOWED)
|
status=status.HTTP_405_METHOD_NOT_ALLOWED)
|
||||||
return resp
|
return super(NotificationTemplateDetail, self).delete(request, *args, **kwargs)
|
||||||
|
|
||||||
class NotificationTemplateTest(GenericAPIView):
|
class NotificationTemplateTest(GenericAPIView):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user