mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Merge pull request #3833 from bradmontgomery/patch-1
QueryParameterVersioning does not use default version
This commit is contained in:
commit
30ef38c861
|
@ -166,7 +166,7 @@ class QueryParameterVersioning(BaseVersioning):
|
|||
invalid_version_message = _('Invalid version in query parameter.')
|
||||
|
||||
def determine_version(self, request, *args, **kwargs):
|
||||
version = request.query_params.get(self.version_param)
|
||||
version = request.query_params.get(self.version_param, self.default_version)
|
||||
if not self.is_allowed_version(version):
|
||||
raise exceptions.NotFound(self.invalid_version_message)
|
||||
return version
|
||||
|
|
Loading…
Reference in New Issue
Block a user