mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 20:50:06 -03:30
flake8 fixes
This commit is contained in:
@@ -47,8 +47,8 @@ class ProjectOptions(models.Model):
|
||||
def get_local_path_choices(cls):
|
||||
if os.path.exists(settings.PROJECTS_ROOT):
|
||||
paths = [x.decode('utf-8') for x in os.listdir(settings.PROJECTS_ROOT)
|
||||
if os.path.isdir(os.path.join(settings.PROJECTS_ROOT, x))
|
||||
and not x.startswith('.') and not x.startswith('_')]
|
||||
if (os.path.isdir(os.path.join(settings.PROJECTS_ROOT, x)) and
|
||||
not x.startswith('.') and not x.startswith('_'))]
|
||||
qs = Project.objects.filter(active=True)
|
||||
used_paths = qs.values_list('local_path', flat=True)
|
||||
return [x for x in paths if x not in used_paths]
|
||||
|
||||
Reference in New Issue
Block a user