Skip to content

Fix error when previewing evaluations with undecided main language#2556

Open
Jakobus400 wants to merge 10 commits into
e-valuation:mainfrom
Jakobus400:lang_preview
Open

Fix error when previewing evaluations with undecided main language#2556
Jakobus400 wants to merge 10 commits into
e-valuation:mainfrom
Jakobus400:lang_preview

Conversation

@Jakobus400

@Jakobus400 Jakobus400 commented Nov 10, 2025

Copy link
Copy Markdown
Collaborator

#2555 Preview of evaluation form failed with undecided language. Fixed by checking in render_vote_page()

@niklasmohrin niklasmohrin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we also still need a test that checks that accessing the page works :)

Comment thread evap/contributor/forms.py Outdated
Comment thread evap/student/views.py Outdated
@niklasmohrin

Copy link
Copy Markdown
Member

one more thing: the magic "fix #..." line should be in the PR description, not the PR title or commit message. You can still change this, and then you will see that this PR will be automatically linked to the issue in the "Development" section on the right of the page.

Comment thread evap/student/views.py Outdated

@niklasmohrin niklasmohrin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code looks good, but still needs tests

@richardebeling richardebeling marked this pull request as draft February 1, 2026 22:06
@janno42

janno42 commented Mar 4, 2026

Copy link
Copy Markdown
Member

Hi @Jakobus400, do you want to continue with this or should we take over?

@richardebeling richardebeling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks

Comment thread evap/staff/tests/test_views.py Outdated

@niklasmohrin niklasmohrin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree with Richard. Other than that, I have one small suggestion. Thanks!

Comment thread evap/student/views.py Outdated
@niklasmohrin niklasmohrin changed the title fix #2555 language x in preview Fix error when previewing evaluations with undecided main language May 1, 2026
@niklasmohrin

Copy link
Copy Markdown
Member

Ah, our linter now complains that the function has too many local variables. I think for this PR it is fine to disable this lint in this function. You can put a pylint: disable=too-many-local-variables comment in the function (there are other examples of this in the code base and you can run ./manage.py lint pylint to check whether it worked)

@niklasmohrin niklasmohrin self-assigned this Jun 29, 2026
@niklasmohrin niklasmohrin marked this pull request as ready for review June 29, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants