Skip to content

Commit 500f7aa

Browse files
authored
[#1319] Bug/CCLA Sign Fail (#1354)
- Fixed issue for CCLA sign process by casting set to list for signature_acl records Signed-off-by: wanyaland <[email protected]>
1 parent 94caa15 commit 500f7aa

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cla-backend/cla/models/docusign_models.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,16 +1262,22 @@ def signed_corporate_callback(self, content, project_id, company_id):
12621262
'loading CLA Managers...')
12631263
# Should have only 1 CLA Manager assigned at this point - grab the list of cla managers from the signature
12641264
# record
1265-
cla_manager_list = signature.get_signature_acl()
1265+
cla_manager_list = list(signature.get_signature_acl())
12661266

12671267
# Load the user record of the initial CLA Manager
1268-
user_list = user.get_user_by_username(cla_manager_list[0])
1269-
if user_list is None:
1268+
if len(cla_manager_list) > 0 :
1269+
user_list = user.get_user_by_username(cla_manager_list[0])
1270+
if user_list is None:
1271+
msg = f'signed_corporate_callback - CLA Manager not assign for signature: {signature}'
1272+
cla.log.warning(msg)
1273+
return {'errors': {'error': msg}}
1274+
else:
1275+
user = user_list[0]
1276+
else:
12701277
msg = f'signed_corporate_callback - CLA Manager not assign for signature: {signature}'
12711278
cla.log.warning(msg)
12721279
return {'errors': {'error': msg}}
1273-
else:
1274-
user = user_list[0]
1280+
12751281

12761282
# Iterate through recipients and update the signature signature status if changed.
12771283
elem = tree.find('.//' + self.TAGS['recipient_statuses'] +

0 commit comments

Comments
 (0)