Skip to content

Commit b7167f9

Browse files
committed
Country code updates are not supported
1 parent 9326f2d commit b7167f9

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.changelog/latest.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
- 4a5773f allow username to be updated by itself
1+
# Changes in Version 3
2+
3+
- Authentication Interface
4+
- Connection Interface
5+
- OAuth Server-to-Server
6+
- UserAction Changes
7+
- Country code removed from `update()` because UMAPI does not support
8+
country code updates
9+
- Enum Naming Tweaks

umapi_client/functional.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,18 @@ def create(self, email, first_name=None,
118118
else:
119119
return self.insert(createFederatedID=dict(**create_params))
120120

121-
def update(self, email=None, username=None, first_name=None, last_name=None, country=None):
121+
def update(self, email=None, username=None, first_name=None, last_name=None):
122122
"""
123123
Update values on an existing user. See the API docs for what kinds of update are possible.
124124
:param email: new email for this user
125125
:param username: new username for this user
126126
:param first_name: new first name for this user
127127
:param last_name: new last name for this user
128-
:param country: new country for this user
129128
:return: the User, so you can do User(...).update(...).add_to_groups(...)
130129
"""
131130
updates = {}
132131
for k, v in dict(email=email, username=username,
133-
firstname=first_name, lastname=last_name,
134-
country=country).items():
132+
firstname=first_name, lastname=last_name).items():
135133
if v:
136134
updates[k] = v
137135
return self.append(update=updates)

0 commit comments

Comments
 (0)