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

Don't provide a VAC Application Deadline for elections that don't require Voter ID #47

Open
chris48s opened this issue Nov 11, 2024 · 0 comments

Comments

@chris48s
Copy link
Member

Currently it is possible to do something like this:

>>> from uk_election_timetables.election_ids import from_election_id
>>> timetable = from_election_id('senedd.2026-05-07')
>>> timetable.vac_application_deadline
datetime.date(2026, 4, 28)

This makes no sense because Senedd elections do not require ID to vote. This applies to:

  • Senedd
  • Scottish Parliament
  • Local Council elections in
    • Wales
    • Scotland
    • City of London

For these cases, calling .vac_application_deadline should either:

  • return None or
  • throw an exception

Also, the election.timetable property should not include the VAC Application Deadline here

{
"label": TimetableEvent.VAC_APPLICATION_DEADLINE.value,
"date": self.vac_application_deadline,
"event": TimetableEvent.VAC_APPLICATION_DEADLINE.name,
},

I think before embarking on this one I would like to have a look over the code for client applications consuming this library and work out the least disruptive way to implement this, or the likely changes needed in client apps to account for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant