remove celery and use dramatiq

This commit is contained in:
virusdefender
2019-03-11 16:21:29 +08:00
parent 1af50c0f4c
commit a5f0c8eb31
16 changed files with 65 additions and 61 deletions

View File

@@ -1,7 +1,6 @@
import functools
import json
import logging
from collections import OrderedDict
from django.http import HttpResponse, QueryDict
from django.utils.decorators import method_decorator
@@ -98,6 +97,8 @@ class APIView(View):
elif isinstance(errors, list):
return self.extract_errors(errors[0], key)
return key, errors
def invalid_serializer(self, serializer):
key, error = self.extract_errors(serializer.errors)
if key == "non_field_errors":