Skip to content

Commit

Permalink
deal with duplicate RemarkPart objects
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Feb 24, 2022
1 parent 9d673e0 commit b848e72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numbas_lti/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ def part_raw_score(self,part,include_remark=True):

remarked = self.remarked_parts.filter(part=part)
if include_remark and remarked.exists():
return remarked.get().score
return remarked.last().score

if (include_remark and self.remarked_parts.filter(part__startswith=part+'g').exists()) or self.resource.discounted_parts.filter(part__startswith=part+'g').exists():
gaps = self.part_gaps(part)
Expand Down

0 comments on commit b848e72

Please sign in to comment.