Skip to content

Fix the bug that occurs when setting the factor for a grade subject that doesn't yet exist.#2213

Open
nilsreichardt wants to merge 2 commits into
mainfrom
fix-bug-of-setting-factor-of-uncreated-subject
Open

Fix the bug that occurs when setting the factor for a grade subject that doesn't yet exist.#2213
nilsreichardt wants to merge 2 commits into
mainfrom
fix-bug-of-setting-factor-of-uncreated-subject

Conversation

@nilsreichardt

Copy link
Copy Markdown
Member

Fixes #2212

@nilsreichardt nilsreichardt added the codex Used for PRs that are generated by Codex. label Mar 18, 2026
@github-actions github-actions Bot added testing feature: grades Users can add their grades to Sharezone. labels Mar 18, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses a bug where setting a weight for a non-existent subject would fail. The logic is now correct, ensuring the subject reference is updated after creation. The addition of a corresponding test case is a great way to prevent regressions. I've included one minor suggestion to align the code with the Dart style guide.

@github-actions

github-actions Bot commented Mar 18, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 1148d70):

https://sharezone-test--pr2213-fix-bug-of-setting-f-t6ww33nu.web.app

(expires Sun, 05 Apr 2026 22:49:49 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

@nilsreichardt nilsreichardt added this pull request to the merge queue Apr 2, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Used for PRs that are generated by Codex. feature: grades Users can add their grades to Sharezone. testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't set a factor for a graded subject if that subject has never been graded.

1 participant