Handle user already in group

This commit is contained in:
uid 2020-10-12 18:55:36 +02:00
parent 1333c03954
commit d90151ce25

View File

@ -98,6 +98,10 @@ def addtogroup(uid, gcn):
print('Group {} not found'.format(gcn)) print('Group {} not found'.format(gcn))
return return
if uid in group['members']:
print('User {} is already in group {}'.format(uid, gcn))
return
add_group_member(client, group, user) add_group_member(client, group, user)