Repository navigation
Alezconsultant/665 criterion endpoint on 846 #847
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,6 +115,21 @@ class Meta: | |
| # indexes every ForeignKey column by default, so a second explicit one here would only | ||
| # cost write throughput without adding any read benefit. | ||
| ] | ||
| # No constraint tying `logic_operator` to child count, and no UniqueConstraint on (parent, | ||
| # ordering): a child group cannot be saved until its parent's primary key exists, so | ||
| # neither has a single-row state to check at save time. See ADR-0002 Decision 2. | ||
| constraints = [ | ||
| # Backstops _create_leaf_group()'s get_or_create() for course-level groups. It has no | ||
| # `condition` because MySQL has no partial indexes: a unique index allows repeated | ||
| # NULLs, and `course` is NULL for roots and leaves. | ||
| models.UniqueConstraint( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Question] I think I may be misunderstanding something more fundamental here. How is this supposed to interact with That's the same problem
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ormsbee The tickets #674, #675 and #717 suggest that we should archive every level: #674's cascade "must run all the way to the root group, not just the immediate parent, stopping only once a level still has active content of its own". I think the option with a As for cases you mention (a new leaf under an archived course-level group, and a group_id pointing to an archived leaf) will be rejected with a 400 by #717 ticket. The tag lock needed even with
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, please create a follow-up issue for the |
||
| fields=["tag", "course", "parent"], | ||
| name="oel_cbe_criteria_group_one_course_group_per_tag_course", | ||
| violation_error_message=_( | ||
| "A competency tag may have at most one course-level CompetencyCriteriaGroup per course." | ||
| ), | ||
| ), | ||
| ] | ||
|
|
||
|
|
||
| class CompetencyRuleProfile(models.Model): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a sentence here that both
get_or_create()s match archived rows deliberately and that #717 decides what happens to them.