Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix private attributes ignore in documentation #6601

Merged
merged 1 commit into from Apr 21, 2019

Conversation

delimitry
Copy link
Contributor

Description

Fix an error in documentation example.
Add .startswith method to check that attribute_name is a private attribute and ignore it.
Without .startswith method calling attribute_name('_') raises TypeError: 'str' object is not callable exception.

Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tomchristie tomchristie merged commit 1ac0f63 into encode:master Apr 21, 2019
terencehonles pushed a commit to terencehonles/django-rest-framework that referenced this pull request Oct 8, 2020
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants