for In[6]
for srcuser in sourceusers: if not srcuser.username in systemusers: if srcuser.username is not target_admin_username: #don't delete the account used to connect try: targetusr = target.users.get(srcuser.username) if targetusr is not None: print('Deleting user: ' + targetusr.fullname) targetusr.reassign_to(target_admin_username) targetusr.delete() except: print('User {} does not exist in Target Portal'.format(srcuser.username))
if I use targetusr.fullname, it always go to the exception, and never delete the user. But if I use targetusr.fullName I can delete the user without problem.
Is this expected?
Solved! Go to Solution.
You're right - it should be targetuser.fullName not targetuser.fullname.
We'll fix this in the sample and the developer website. Thanks for pointing it out.
Rohit
You're right - it should be targetuser.fullName not targetuser.fullname.
We'll fix this in the sample and the developer website. Thanks for pointing it out.
Rohit