Skip to content

Commit

Permalink
portal: names arg for maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Sep 23, 2021
1 parent 8cc4938 commit 980a13e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mpcontribs-portal/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
HEADERS = {"X-Authenticated-Groups": os.environ["ADMIN_GROUP"]}


def generate_downloads():
def generate_downloads(names=None):
q = {"name__in": names} if names else {}
client = Client(host=os.environ["MPCONTRIBS_API_HOST"], headers=HEADERS)
projects = client.projects.get_entries(
_fields=["name", "stats"]
_fields=["name", "stats"], **q
).result().get("data", [])
skip = {"columns", "contributions"}
print("PROJECTS", len(projects))
Expand Down

0 comments on commit 980a13e

Please sign in to comment.