Do not show 0/0 in workshop table if workshop has no tasks - #677
Open
cytadela8 wants to merge 2 commits into
Open
Do not show 0/0 in workshop table if workshop has no tasks#677cytadela8 wants to merge 2 commits into
cytadela8 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses issue #659 by avoiding the display of "0/0" in the workshop table when a workshop has no tasks. Key changes include:
- Adding logic to randomly determine and attach qualification tasks for qualifying workshops.
- Updating the workshop qualification fields and saving an associated qualification file.
- Modifying the workshop list template to conditionally show a dash ("-") instead of "0/0" when no qualification tasks exist.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| wwwapp/management/commands/populate_with_test_data.py | Added logic for qualification tasks file creation and threshold update. |
| templates/listworkshop.html | Updated template conditional to display "-" when tasks are missing. |
Comments suppressed due to low confidence (2)
wwwapp/management/commands/populate_with_test_data.py:174
- [nitpick] Consider renaming the variable 'has_qualification_tasks' to something more descriptive (e.g., 'include_qualification_tasks') to clearly indicate that it determines whether qualification tasks should be attached to a qualifying workshop.
is_qualifying = self.fake.boolean(chance_of_getting_true=70)
templates/listworkshop.html:81
- Consider adding test coverage to verify that the workshop table correctly displays '-' instead of '0/0' when no qualification tasks are attached.
<td data-order="-1">
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #659
This PR was vibecoded 🙃
This change is