Changed the implementation of Submission.latest_checks() to also return None checks, so it's possible to update a Passed due to no yang modules to a None (no modules to check).

- Legacy-Id: 13698
This commit is contained in:
Henrik Levkowetz 2017-06-20 21:05:48 +00:00
parent 5e80e00aea
commit 95f966c98b

View file

@ -66,7 +66,7 @@ class Submission(models.Model):
return Document.objects.filter(name=self.name).first()
def latest_checks(self):
checks = [ self.checks.filter(checker=c, passed__in=[True,False]).latest('time') for c in self.checks.values_list('checker', flat=True).distinct() ]
checks = [ self.checks.filter(checker=c).latest('time') for c in self.checks.values_list('checker', flat=True).distinct() ]
return checks
class SubmissionCheck(models.Model):