* fixes bug
This commit is contained in:
mpeltriaux 2022-02-04 15:59:53 +01:00
parent 16505c79e7
commit 6525f24121
2 changed files with 7 additions and 2 deletions

View File

@ -89,7 +89,10 @@ class InterventionQualityChecker(AbstractQualityChecker):
Returns:
"""
c_comps = self.obj.compensations.count()
comps = self.obj.compensations.filter(
deleted=None
)
c_comps = comps.count()
c_pays = self.obj.payments.count()
c_deducs = self.obj.deductions.count()
c_all = c_comps + c_pays + c_deducs

View File

@ -515,7 +515,9 @@ class RecordModalForm(BaseModalForm):
Returns:
"""
comps = self.instance.compensations.all()
comps = self.instance.compensations.filter(
deleted=None,
)
comps_valid = True
for comp in comps:
checker = comp.quality_check()