Skip to content

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

Open
cytadela8 wants to merge 2 commits into
masterfrom
659-no-tasks-display
Open

Do not show 0/0 in workshop table if workshop has no tasks#677
cytadela8 wants to merge 2 commits into
masterfrom
659-no-tasks-display

Conversation

@cytadela8

@cytadela8 cytadela8 commented Jun 18, 2025

Copy link
Copy Markdown
Member

This fixes #659

This PR was vibecoded 🙃


This change is Reviewable

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

Copilot AI left a comment

Copy link
Copy Markdown

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

2 participants