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

fix: serialization of unfinished, unscored peer assignments #2142

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

nsprenkle
Copy link
Contributor

TL;DR - Fixes issue serializing grades for unfinished, unscored peer assignments.

What changed?

We were running into the issue below when trying to get grade data for peers in new ORA experience:

AttributeError: Got AttributeError when attempting to get a value for field `assessments` on serializer `UnweightedPeerAssessmentsSerializer`. The serializer field might be named incorrectly and not match any attribute or key on the `PeerAssessmentAPI` instance. Original exception text was: 'NoneType' object has no attribute 'pk'.

It was determined that this came from serializing unscored peer workflow items that didn't have an associated assessment (unfinished assessment) based on how we are doing that lookup. Added a null check to the filter to remove these from the resopnse.

Developer Checklist

Testing Instructions

See UAT tests.

Reviewer Checklist

Collectively, these should be completed by reviewers of this PR:

  • I've done a visual code review
  • I've tested the new functionality

FYI: @openedx/content-aurora

@nsprenkle nsprenkle requested a review from a team as a code owner December 13, 2023 20:12
@nsprenkle nsprenkle merged commit dc4a5a9 into master Dec 13, 2023
5 checks passed
@nsprenkle nsprenkle deleted the nsprenkle/peer-unscored-fix branch December 13, 2023 20:29
BryanttV pushed a commit to eduNEXT/edx-ora2 that referenced this pull request Feb 6, 2024
…2142)

* fix: fix serializing of null assessments in score

* chore: bump ORA to 6.0.16
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.

2 participants