Skip to content

Commit

Permalink
fix: consider workflow requirements without peers dict
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Mar 26, 2024
1 parent 9dae7ac commit 49a679f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openassessment/assessment/api/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def get_peer_grading_strategy(workflow_requirements):
"""
Get the peer grading type, either mean or median. Default is median.
"""
if "peer" not in workflow_requirements:
return workflow_requirements.get("grading_strategy", PeerGradingStrategy.MEDIAN)
return workflow_requirements.get("peer", {}).get(
"grading_strategy", PeerGradingStrategy.MEDIAN,
)
Expand Down

0 comments on commit 49a679f

Please sign in to comment.