Merge pull request #2679 from anoek/2636

Fixed notification template deleting
This commit is contained in:
Akita Noek 2016-06-28 13:41:20 -04:00 committed by GitHub
commit eb65172087

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):