Skip to content

Commit

Permalink
Merge pull request #4276 from nickmango/bug/add-ldap-group
Browse files Browse the repository at this point in the history
[#4273] Request Ecla - Gerrit
  • Loading branch information
nickmango authored Mar 25, 2024
2 parents 276cae1 + 7c8bf5d commit a1d26a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion cla-backend/cla/models/docusign_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,12 @@ def request_employee_signature_gerrit(self, project_id, company_id, user_id, ret
new_signature.set_signature_acl(user.get_lf_username())

# Save signature before adding user to the LDAP Group.
new_signature.save()
cla.log.debug(f'{fn} - saving signature...{new_signature.to_dict()}')
try:
self._save_employee_signature(new_signature)
except Exception as ex:
cla.log.error(f'{fn} - unable to save signature error: {ex}')
return
cla.log.info(f'{fn} - saved signature for: {request_info}')
event_data = (f'The user {user.get_user_name()} acknowledged the CLA company affiliation for '
f'company {company.get_company_name()} with ID {company.get_company_id()}, '
Expand Down
4 changes: 3 additions & 1 deletion cla-backend/cla/models/dynamo_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import re
import time
import uuid
from datetime import timezone
from typing import Optional, List

import dateutil.parser
Expand Down Expand Up @@ -2674,7 +2675,8 @@ def to_dict(self):
return d

def save(self) -> None:
self.model.date_modified = datetime.datetime.utcnow()
self.model.date_modified = datetime.datetime.now(timezone.utc)
cla.log.info(f'saving datetime: {self.model.date_modified}')
self.model.save()

def load(self, signature_id):
Expand Down

0 comments on commit a1d26a7

Please sign in to comment.