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

Only show warning on jury problemset page before contest start. #2980

Merged
merged 1 commit into from
Mar 30, 2025

Conversation

meisterT
Copy link
Member

No description provided.

@meisterT meisterT enabled auto-merge March 29, 2025 16:34
@@ -11,6 +11,6 @@
problem_statement_path: 'jury_problem_statement',
problem_attachment_path: 'jury_attachment_fetch',
problem_sample_zip_path: 'jury_problem_sample_zip',
show_jury_warning: true
show_jury_warning: not current_contest.state or not current_contest.state.started
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
show_jury_warning: not current_contest.state or not current_contest.state.started
show_jury_warning: not current_contest or not current_contest.state or not current_contest.state.started

This still failed for when there is no contest active, I wonder if not current_contest or not current_contest.state.started should also be enough. So if any current_contest will also have the state already. Looking at the getState() I think it does. But I think I prefer to protect against this without this extra knowledge and go for the first suggestion.

Suggested change
show_jury_warning: not current_contest.state or not current_contest.state.started
show_jury_warning: not current_contest or not current_contest.state.started

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I simplified this condition even more.

@meisterT meisterT added this pull request to the merge queue Mar 30, 2025
Merged via the queue into DOMjudge:main with commit 1530b1a Mar 30, 2025
36 checks passed
@meisterT meisterT deleted the nowarnafterstart branch March 30, 2025 11:09
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.

3 participants