Created
May 24, 2017 19:33
-
-
Save townie/1e836e92f4e0bda0794d1a4590e2f19f to your computer and use it in GitHub Desktop.
Missing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _MISSING = object() | |
| def update_method(user, first_name=_MISSING, last_name=_MISSING): | |
| if first_name is not _MISSING: | |
| user.first_name = first_name | |
| if last_name is not _MISSING: | |
| user.last_name = last_name | |
| user.save() # or someshit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment