Skip to content
Snippets Groups Projects
Commit 040d3eaf authored by Erin Mullaney's avatar Erin Mullaney Committed by Todd Dembrey
Browse files

GH-962 rename get_author_role method to get_author_assignment

parent ff305e5a
No related branches found
No related tags found
No related merge requests found
......@@ -189,5 +189,5 @@ class ReviewOpinion(models.Model):
return self.get_opinion_display()
def get_author_role(self):
role = self.review.submission.assigned.with_roles().filter(reviewer=self.author).first()
return role.role if role else None
assignment = self.review.submission.assigned.with_roles().filter(reviewer=self.author).first()
return assignment.role if assignment else None
......@@ -4,7 +4,7 @@
{% for opinion in opinions %}
<li>
{{ opinion.author }}
{% if opinion.get_author_role %}{% image opinion.get_author_role.icon max-12x12 %}{% endif %}
{% if opinion.get_author_assignment %}{% image opinion.get_author_assignment.icon max-12x12 %}{% endif %}
{{ opinion.get_opinion_display }}s
</li>
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment