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

Update no election text logic #1695

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Update no election text logic #1695

merged 1 commit into from
Sep 19, 2023

Conversation

Bekabyx
Copy link
Contributor

@Bekabyx Bekabyx commented Sep 18, 2023

Closes #1694

The logic for this was totally broken, referencing variables that seemingly weren't in the page payload. As this message should only be displayed when there are no elections to show, I've simply moved the html up to the same conditional block that is responsible for the "No elections in your area" text.

This means there's a slight change in text order on the "No elections" style page, but imo this looks fine.

To test:

  • Run manage.py import_ballots --current if you're not totally up to date
  • Use B773AE in the postcode search
  • You should see the Elections in Your Area card without the "Local and devolved elections..." message

PR Checklist

Preview Give feedback

@Bekabyx Bekabyx force-pushed the hotfix/no-election-text branch from af6fe06 to 2ad08f5 Compare September 18, 2023 16:09
@Bekabyx Bekabyx marked this pull request as ready for review September 18, 2023 16:09
@coveralls
Copy link

Coverage Status

coverage: 61.46%. remained the same when pulling 2ad08f5 on hotfix/no-election-text into 17a321f on master.

Copy link
Contributor

@VirginiaDooley VirginiaDooley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That postcode didn't work for me even after an import, but I was able to look at an upcoming election and did not see the text as expected. 👍

@Bekabyx Bekabyx merged commit 1c15734 into master Sep 19, 2023
VirginiaDooley added a commit that referenced this pull request Sep 19, 2023
VirginiaDooley added a commit that referenced this pull request Sep 19, 2023
VirginiaDooley added a commit that referenced this pull request Sep 19, 2023
VirginiaDooley added a commit that referenced this pull request Sep 21, 2023
VirginiaDooley added a commit that referenced this pull request Sep 21, 2023
VirginiaDooley added a commit that referenced this pull request Sep 21, 2023
VirginiaDooley added a commit that referenced this pull request Sep 25, 2023
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

Successfully merging this pull request may close these issues.

'No election' text unexpectedly displaying on multi-ballot view
3 participants