instructure/canvas-lms · error · PeerReview::ParentOverrideNotFoundError

Parent assignment Group override not found for group

Error message

Parent assignment Group override not found for group %{group_id}

What it means

PeerReview::ParentOverrideNotFoundError raised when validate_group_parent_override_exists cannot find the parent Group override for the given group_id. Child peer-review overrides require an existing parent override to attach to.

Solutions

  1. Regenerate/re-run parent override creation for the group category so each group has a parent override
  2. Verify group_id is correct and the group belongs to the assignment's group category
  3. Create the missing parent Group override explicitly before the child override
  4. Check for cleanup jobs or callbacks that delete group overrides and re-run them

Example fix

// before
PeerReview::CreateChildOverride.call(parent_override: nil, group_id: group.id)
// after
parent = PeerReview::EnsureGroupParentOverride.call(assignment:, group:)
PeerReview::CreateChildOverride.call(parent_override: parent, group_id: group.id)
Defensive patterns

Strategy: validation

Validate before calling

parent = assignment.assignment_overrides.active.find_by(set_type: 'Group', set_id: group_id)
raise ArgumentError, 'missing parent group override' unless parent

Type guard

null

Try / catch

begin
  PeerReview::CreateChildOverride.call(parent_override:, group_id:)
rescue PeerReview::ParentOverrideNotFoundError
  # regenerate parent overrides for the group category, then retry
end

Prevention

When it happens

Trigger: Creating a peer-review group child override whose parent Group override does not exist — the group was added to the category after parents were generated, or the parent was deleted.

Common situations: New groups created after the parent-override generation ran; group moved between categories; parent overrides pruned by a cleanup job; wrong group_id passed.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15). Data as JSON: /api/errors/77008e5c343ce0fc. Report an issue: GitHub.

Appendix: source

Thrown at app/services/peer_review/validations.rb:258

  end

  def validate_adhoc_parent_override_exists(parent_override, student_ids)
    unless parent_override.present?
      raise PeerReview::ParentOverrideNotFoundError,
            I18n.t("Parent assignment ADHOC override not found for students %{student_ids}", student_ids: student_ids.join(", "))
    end
  end

  def validate_course_parent_override_exists(parent_override, course_id)
    unless parent_override.present?
      raise PeerReview::ParentOverrideNotFoundError,
            I18n.t("Parent assignment Course override not found for course %{course_id}", course_id:)
    end
  end

  def validate_group_parent_override_exists(parent_override, group_id)
    unless parent_override.present?
      raise PeerReview::ParentOverrideNotFoundError,
            I18n.t("Parent assignment Group override not found for group %{group_id}", group_id:)
    end
  end

  def validate_section_parent_override_exists(parent_override, section_id)
    unless parent_override.present?
      raise PeerReview::ParentOverrideNotFoundError,
            I18n.t("Parent assignment Section override not found for section %{section_id}", section_id:)
    end
  end
end

View on GitHub (pinned to 1c9f0bb801)