Skip to content

Commit

Permalink
[#3824] Bug/Ecla signature check (#3825)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmango authored Mar 1, 2023
1 parent 6578d72 commit 4128212
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions cla-backend/cla/models/dynamo_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1898,15 +1898,18 @@ def get_latest_signature(self, project_id, company_id=None, signature_signed=Non
signature_signed=signature_signed, signature_approved=signature_approved)
latest = None
for signature in signatures:
if latest is None:
latest = signature
elif signature.get_signature_document_major_version() > latest.get_signature_document_major_version():
latest = signature
elif (
signature.get_signature_document_major_version() == latest.get_signature_document_major_version()
and signature.get_signature_document_minor_version() > latest.get_signature_document_minor_version()
):
if signature.get_signature_approved() and signature.get_signature_signed():
latest = signature
break
# if latest is None:
# latest = signature
# elif signature.get_signature_document_major_version() > latest.get_signature_document_major_version():
# latest = signature
# elif (
# signature.get_signature_document_major_version() == latest.get_signature_document_major_version()
# and signature.get_signature_document_minor_version() > latest.get_signature_document_minor_version()
# ):
# latest = signature

if latest is None:
cla.log.debug(
Expand Down

0 comments on commit 4128212

Please sign in to comment.