fix: update the project after task deletion so that the % completed s… (#22591)

* fix: update the project after task deletion so that the % completed shows correct value

* fix: patch to correct % complete of previous projects

* fix: for version-13

* fix: removed patch from v13

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Anurag Mishra <32095923+Anurag810@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
Afshan
2020-07-24 10:48:16 +05:30
committed by GitHub
parent 91fe10666e
commit ecb1460440
3 changed files with 18 additions and 0 deletions

View File

@@ -175,6 +175,9 @@ class Task(NestedSet):
self.update_nsm_model()
def after_delete(self):
self.update_project()
def update_status(self):
if self.status not in ('Cancelled', 'Completed') and self.exp_end_date:
from datetime import datetime