[FIX] runbot: manage falsy path_glob

This commit is contained in:
Xavier-Do 2022-12-22 14:40:13 +01:00
parent 5540f84667
commit ad573d64cf

View File

@ -74,6 +74,8 @@ class RunbotTeam(models.Model):
return ownership.team_id
for team in self:
if not team.path_glob:
continue
if any([fnmatch(file_path, pattern.strip().strip('-')) for pattern in team.path_glob.split(',') if pattern.strip().startswith('-')]):
continue
if any([fnmatch(file_path, pattern.strip()) for pattern in team.path_glob.split(',') if not pattern.strip().startswith('-')]):