Skip to content

Commit 6d176df

Browse files
committed
Fixed the if condition with flake8 requirement
1 parent caeb594 commit 6d176df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework_docs/api_endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def __get_serializer_fields__(self, serializer):
123123
"sub_fields": sub_fields,
124124
"required": field.required,
125125
"to_many_relation": to_many_relation,
126-
"max_length": (field.__dict__.get('max_length', '-') if field.__dict__.get('max_length', '-') != None else '-')
126+
"max_length": (field.__dict__.get('max_length', '-') if field.__dict__.get('max_length', '-') is not None else '-')
127127
})
128128
# FIXME:
129129
# Show more attibutes of `field`?

0 commit comments

Comments
 (0)