Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
c7e2d1d9
Commit
c7e2d1d9
authored
Mar 20, 2017
by
Dariusz Czech
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not hint BigAutoField as integer (outside of range)
parent
928f7cb4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
rest_framework/schemas.py
+4
-2
No files found.
rest_framework/schemas.py
View file @
c7e2d1d9
import
re
from
collections
import
OrderedDict
from
importlib
import
import_module
import
re
from
django.conf
import
settings
from
django.contrib.admindocs.views
import
simplify_regex
...
...
@@ -23,6 +23,7 @@ from rest_framework.utils import formatting
from
rest_framework.utils.model_meta
import
_get_pk
from
rest_framework.views
import
APIView
header_regex
=
re
.
compile
(
'^[a-zA-Z][0-9A-Za-z_]*:'
)
...
...
@@ -541,7 +542,8 @@ class SchemaGenerator(object):
elif
model_field
is
not
None
and
model_field
.
primary_key
:
description
=
get_pk_description
(
model
,
model_field
)
if
isinstance
(
model_field
,
models
.
AutoField
):
# BigAutoField is outside of Integer range
if
isinstance
(
model_field
,
models
.
AutoField
)
and
not
isinstance
(
model_field
,
models
.
BigAutoField
):
schema_cls
=
coreschema
.
Integer
field
=
coreapi
.
Field
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment