Fixed notification template deleting

#2674
This commit is contained in:
Akita Noek
2016-06-28 12:27:13 -04:00
parent 4f534122c5
commit 8ad505c9cc

View File

@@ -3462,7 +3462,7 @@ class NotificationTemplateDetail(RetrieveUpdateDestroyAPIView):
if obj.notifications.filter(status='pending').exists():
return Response({"error": "Delete not allowed while there are pending notifications"},
status=status.HTTP_405_METHOD_NOT_ALLOWED)
return resp
return super(NotificationTemplateDetail, self).delete(request, *args, **kwargs)
class NotificationTemplateTest(GenericAPIView):