diff options
author | Magnus Hagander | 2023-10-27 11:39:59 +0000 |
---|---|---|
committer | Magnus Hagander | 2023-10-27 11:52:23 +0000 |
commit | bce9badd1f5aebe08dbd2a0569fb8fb5fd60aea0 (patch) | |
tree | 62ab972e77bcb0676892e10807808758f5f43bde /postgresqleu/digisign/util.py | |
parent | 6675aa219e3c68f5e0cba2fa07379620682b99fc (diff) |
Track and show processing dates of digital contracts
Instead of just keeping track of that a contract has been signed,
explicitly track *when* it was sign. Also track when a contract is
partially signed (for confsponsor that's signed by the sponsor but not
by the organizers). And show this information on the sponsorship
dashboard and the sponsorship details.
Diffstat (limited to 'postgresqleu/digisign/util.py')
-rw-r--r-- | postgresqleu/digisign/util.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/postgresqleu/digisign/util.py b/postgresqleu/digisign/util.py index ba84b1b3..f8809737 100644 --- a/postgresqleu/digisign/util.py +++ b/postgresqleu/digisign/util.py @@ -1,3 +1,6 @@ +from django.utils import timezone + + digisign_providers = { 'postgresqleu.digisign.implementations.signwell.Signwell': (), } @@ -19,7 +22,8 @@ class DigisignHandlerBase: self.doc = doc def completed(self): - pass + self.doc.completed = timezone.now() + self.doc.save(update_fields=['completed', ]) def expired(self): pass @@ -31,4 +35,7 @@ class DigisignHandlerBase: pass def signed(self, signedby): - pass + if not self.doc.firstsigned: + # This is the first signature (for most docs, it means the counterpart) + self.doc.firstsigned = timezone.now() + self.doc.save(update_fields=['firstsigned', ]) |