Only display 'active' maintainers who have at least one working+maintained app

This commit is contained in:
Alexandre Aubin 2018-12-10 21:36:22 +00:00
parent 4388c05fa8
commit 51604a9fe4

View file

@ -161,7 +161,6 @@ def app_maintainer_dash():
maintainers = set() maintainers = set()
apps = App.query.all() apps = App.query.all()
for app in apps: for app in apps:
maintainers.update(app.maintainers)
for test in app.most_recent_tests_per_branch(): for test in app.most_recent_tests_per_branch():
if test.branch.name == "stable": if test.branch.name == "stable":
app.ci_level = test.level app.ci_level = test.level
@ -169,6 +168,10 @@ def app_maintainer_dash():
if isinstance(app.public_level, str): if isinstance(app.public_level, str):
app.public_level = -1 app.public_level = -1
if app.maintained and app.state in ["working", "official"]:
maintainers.update(app.maintainers)
maintainers = sorted(maintainers, key=lambda m: m.lower()) maintainers = sorted(maintainers, key=lambda m: m.lower())
apps = sorted(apps, key=lambda app: app.name.lower()) apps = sorted(apps, key=lambda app: app.name.lower())