Skip to content

Commit

Permalink
Merge pull request #227 from roocs/dev-check-fixes
Browse files Browse the repository at this point in the history
fix check for applying fixes
  • Loading branch information
cehbrecht authored Jul 20, 2023
2 parents 338fb25 + 4674cf1 commit a1faa10
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions rook/director/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ def __init__(self, coll, inputs):

self._resolve()
# if enabled for the project then check if a fix will be applied
if CONFIG[f"project:{self.project}"].get("use_fixes", False):
self._check_apply_fixes()
else:
self.inputs["apply_fixes"] = False
self._check_apply_fixes()

def use_fixes(self):
return CONFIG[f"project:{self.project}"].get("use_fixes", False)

def _check_apply_fixes(self):
if (
self.inputs.get("apply_fixes")
self.use_fixes()
and self.inputs.get("apply_fixes")
and not self.use_original_files
and self.requires_fixes()
):
Expand Down Expand Up @@ -117,6 +118,9 @@ def _resolve(self):
# If we got here: then WPS will be used, because `self.use_original_files == False`

def requires_fixes(self):
if not self.use_fixes():
return False

if self.search_result:
ds_ids = self.search_result.files()
else:
Expand Down

0 comments on commit a1faa10

Please sign in to comment.