Skip to content
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

Do not check for family on unit in a unit group for validation across family #44494

Merged
merged 5 commits into from
Jan 25, 2022

Conversation

dmcavoy
Copy link
Contributor

@dmcavoy dmcavoy commented Jan 24, 2022

When saving a unit in CSP errors were showing up:

Screen Shot 2022-01-24 at 1 22 16 PM

When saving a unit that does not have a family name (is in a unit group) we should not be checking to see if it is consistent with other units in a family.

Links

Slack

Testing story

  • Added unit test
  • Checked that I could save CSP units, CSP course, and course d locally.

@dmcavoy dmcavoy requested a review from a team January 24, 2022 22:00
return nil if family_name.nil_or_empty?

all_family_courses = nil

if is_a?(UnitGroup) || (is_a?(Script) && unit_group)
if is_a?(UnitGroup)
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the comment, if this is a script in a unit group we should be checking the unit group's family name right? I think that's what you're removing here, but should this method return nil or the empty array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the comment

@dmcavoy dmcavoy merged commit a007831 into staging Jan 25, 2022
@dmcavoy dmcavoy deleted the family-consistency-check branch January 25, 2022 03:11
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.

None yet

2 participants