Accidental refactor, split out legacy.py into separate sumodules and update all call sites.
This commit is contained in:
parent
2109d24483
commit
3efaa255e8
92 changed files with 4458 additions and 4269 deletions
|
@ -7,16 +7,16 @@ def renameUser(username, new_name):
|
|||
if username == new_name:
|
||||
raise Exception('Must give a new username')
|
||||
|
||||
check = model.get_user_or_org(new_name)
|
||||
check = model.user.get_user_or_org(new_name)
|
||||
if check is not None:
|
||||
raise Exception('New username %s already exists' % new_name)
|
||||
|
||||
existing = model.get_user_or_org(username)
|
||||
existing = model.user.get_user_or_org(username)
|
||||
if existing is None:
|
||||
raise Exception('Username %s does not exist' % username)
|
||||
|
||||
print 'Renaming user...'
|
||||
model.change_username(existing.id, new_name)
|
||||
model.user.change_username(existing.id, new_name)
|
||||
print 'Rename complete'
|
||||
|
||||
|
||||
|
|
Reference in a new issue