Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out candidate files with "template" in name #47

Open
jberkus opened this issue Oct 18, 2021 · 2 comments
Open

Filter out candidate files with "template" in name #47

jberkus opened this issue Oct 18, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jberkus
Copy link
Member

jberkus commented Oct 18, 2021

Currently, if an org names a template file for candidates candidate-template.md then that will appear as if it were a real candidate in the election.

Modify the candidate sorter to screen out these files.

@jberkus jberkus added enhancement New feature or request good first issue Good for newcomers labels Oct 27, 2021
@sumit-158
Copy link

Hi, @jberkus I'm kinda new to open source so, can I work on this? Even possible could you help me through it.

@jberkus
Copy link
Member Author

jberkus commented Mar 4, 2022

@sumit-158 sure! It should be a relatively easy fix.

The candidates get filtered in https://github.com/elekto-io/elekto/blob/main/elekto/models/meta.py when we pull them from disk. You'd just need to add a regex filter on the names to screen out ones that have the word "template" in them, even if they do have the word "candidate".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants