Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 3e3344b4 authored by Ricardo SILVA's avatar Ricardo SILVA
Browse files

Small fixes on the update of users in the sid user script lk:31512105424615

parent c2373b90
No related branches found
No related tags found
No related merge requests found
......@@ -724,14 +724,21 @@ def main():
if debug and logindebug and logindebug != user:
continue
params = {'name': user}
user_exists = diego.diego_run_dieget_by_name('sid_check_user_exists', params)
need_to_create = False
need_to_update = False
if user in sid_results[1]:
logger.debug('SID user ' + user + ' should be updated.')
need_to_update = True
block_to_update = diego.diegoGetObject(sid_results[1][user]['uid'], context_uid)
elif user not in sid_results[1] and user not in sid_resigned_results[1]:
elif user in user_exists[1] and user not in sid_results[1] and user not in sid_resigned_results[1]:
incomplete_users.append(user)
logger.debug('SID user ' + user + ' is incomplete and should be updated.')
need_to_update = True
block_to_update = diego.diegoGetObject(user_exists[1][user]['uid'], context_uid)
elif user not in sid_results[1] and user not in sid_resigned_results[1] and user not in user_exists[1]:
need_to_create = True
logger.debug('SID user ' + user + ' should be addded.')
logger.debug(pformat(snet_results['users'][user]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment