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

Candidates should look up by ID, not filename #40

Open
jberkus opened this issue Oct 5, 2021 · 0 comments
Open

Candidates should look up by ID, not filename #40

jberkus opened this issue Oct 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@jberkus
Copy link
Member

jberkus commented Oct 5, 2021

Currently how candidates are looked up for display is this:

        path = os.path.join(self.path, 'candidate-{}.md'.format(cid))

This means that, for candidates to display correctly, the ID in the file and the 2nd half of the filename must match exactly. This is error-prone.

Since we have a dictionary that has the full list of candidates in it, we should look up candidates by ID and then find the correct filename from that. That way, the file can be named whatever as long as it starts with "candidate-".

Putting this as a TODO, since I need to fix one other issue about how candidates display and I'll probably do them both at once.

@jberkus jberkus added the enhancement New feature or request label Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant