Skip to content

Do not show 0/0 in workshop table if workshop has no tasks #677

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cytadela8
Copy link
Member

@cytadela8 cytadela8 commented Jun 18, 2025

This fixes #659

This PR was vibecoded 🙃


This change is Reviewable

@cytadela8 cytadela8 requested review from krzys-h and Copilot June 18, 2025 11:20
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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">

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.

Workshops with no tasks are not displayed correctly in the table
1 participant