Commit d3760f08 authored by Michal Čihař's avatar Michal Čihař

Always run first target checks

Some source checks might depend on result of target checks (multiple
failures), so we need to run these first.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 4f5063d8
......@@ -908,10 +908,8 @@ class Unit(models.Model, LoggerMixin):
self.source_checks().values_list('check', flat=True)
)
# Run all checks
for check in checks_to_run:
check_obj = CHECKS[check]
# Target check
# Run all source checks
for check, check_obj in checks_to_run.items():
if check_obj.target and check_obj.check_target(src, tgt, self):
if check in old_target_checks:
# We already have this check
......@@ -927,7 +925,8 @@ class Unit(models.Model, LoggerMixin):
for_unit=self.pk
)
was_change = True
# Source check
# Run all source checks
for check, check_obj in checks_to_run.items():
if check_obj.source and check_obj.check_source(src, self):
if check in old_source_checks:
# We already have this check
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment