forked from CMS/memberPlumbing
ucsAccounts: Print user info on error for debugging purposes
This commit is contained in:
parent
3849aca918
commit
34539eb630
@ -5,7 +5,7 @@ import re
|
||||
import string
|
||||
|
||||
from udm_rest_client.udm import UDM
|
||||
from udm_rest_client.exceptions import NoObject
|
||||
from udm_rest_client.exceptions import NoObject, UdmError
|
||||
|
||||
from .config import Config
|
||||
|
||||
@ -111,7 +111,12 @@ async def _main():
|
||||
other_old_groups = [g for g in user.props.groups if g[3:].startswith("MW_")]
|
||||
user.props.groups = other_old_groups + new_groups
|
||||
|
||||
try:
|
||||
await user.save()
|
||||
except UdmError:
|
||||
print("Failed to save user", username)
|
||||
print(user.props)
|
||||
raise
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user