misc: increase djangorestframework version limit (#49537)
This commit is contained in:
parent
b44da82e3b
commit
41f53ebd1a
|
@ -223,8 +223,8 @@ class ValidationAPI(CommonAPIMixin,
|
|||
return super(ValidationAPI, self).get_queryset().filter(document_type=self.document_type)
|
||||
|
||||
def initial(self, request, document_type, *args, **kwargs):
|
||||
self.schema = utils.get_document_type_schema(settings, document_type)
|
||||
if not self.schema:
|
||||
self.document_type_schema = utils.get_document_type_schema(settings, document_type)
|
||||
if not self.document_type_schema:
|
||||
error = serializers.ValidationError('unknown document type')
|
||||
error.status_code = status.HTTP_404_NOT_FOUND
|
||||
raise error
|
||||
|
@ -233,7 +233,7 @@ class ValidationAPI(CommonAPIMixin,
|
|||
|
||||
def get_serializer(self, *args, **kwargs):
|
||||
# pass schema to serializer class
|
||||
return super(ValidationAPI, self).get_serializer(schema=self.schema, *args, **kwargs)
|
||||
return super(ValidationAPI, self).get_serializer(schema=self.document_type_schema, *args, **kwargs)
|
||||
|
||||
router = routers.SimpleRouter()
|
||||
router.register(r'validation/(?P<document_type>[^/]*)', ValidationAPI,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
django>=1.7,<1.9
|
||||
django-tables2<1.1
|
||||
django-jsonfield >= 0.9.3
|
||||
djangorestframework>=3.3,<3.4
|
||||
djangorestframework>=3.3,<3.10
|
||||
file-magic
|
||||
|
|
Loading…
Reference in New Issue