Skip to content

Introducing auth.DELETE_ATTRIBUTE sentinel value #285

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

Merged
merged 3 commits into from
May 20, 2019

Conversation

hiranya911
Copy link
Contributor

We allow deleting some user attributes (display_name, photo_url etc) by explicitly passing None to the update_user() function. To make this API more idiomatic, we wish to introduce an auth.DELETE_ATTRIBUTE sentinel value (constant) instead.

Before:

# Remove the photo_url from the user account
auth.update_user(uid, photo_url=None)

After:

# Remove the photo_url from the user account
auth.update_user(uid, photo_url=auth.DELETE_ATTRIBUTE)

We will support both None and the new sentinel value for now. We will stop supporting None in the major release.

go/firebase-python-sentinels

@hiranya911 hiranya911 requested a review from bklimt May 6, 2019 18:56
@hiranya911 hiranya911 assigned hiranya911 and unassigned bklimt May 20, 2019
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.

2 participants