Skip to content

Commit 971ef61

Browse files
committed
make the tests pass
1 parent b9c0a0e commit 971ef61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

umapi_client/functional.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ def update(self, email=None, username=None, first_name=None, last_name=None, cou
167167
"""
168168
if username and self.id_type != IdentityTypes.federatedID:
169169
raise ArgumentError("You cannot set username except for a federated ID")
170-
if username and not email:
171-
raise ArgumentError("Cannot update username when email is not specified")
170+
if username and '@' in username and not email:
171+
raise ArgumentError("Cannot update email-type username when email is not specified")
172172
if email and username and email.lower() == username.lower():
173173
raise ArgumentError("Specify just email to set both email and username for a federated ID")
174174
updates = {}

0 commit comments

Comments
 (0)