check if the profile already exists
@@ -8,6 +8,8 @@ def create_profile(client, email, first, last, middle = None):
response = client.get_tildeusername(first, last, middle)
tilde_id = response['username']
+ if tilde_id.endswith(last + '1'):
+
tilde_group = Group(id = tilde_id, signatures = [super_user_id], signatories = [tilde_id], readers = [tilde_id], writers = [super_user_id], members = [email])
email_group = Group(id = email, signatures = [super_user_id], signatories = [email], readers = [email], writers = [super_user_id], members = [tilde_id])
profile_content = {
@@ -28,4 +30,7 @@ def create_profile(client, email, first, last, middle = None):
return profile
+ else:
+ raise OpenReviewException('There is already a profile with this first, middle and last name')
+
