From 040d3eafa371ced26d4519cb62ebb92789b662ed Mon Sep 17 00:00:00 2001 From: Erin Mullaney <erin.mullaney@torchbox.com> Date: Thu, 21 Feb 2019 11:28:11 -0500 Subject: [PATCH] GH-962 rename get_author_role method to get_author_assignment --- opentech/apply/review/models.py | 4 ++-- .../templates/review/includes/review_opinions_list.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opentech/apply/review/models.py b/opentech/apply/review/models.py index 1c3f4bac4..2b9ce85dd 100644 --- a/opentech/apply/review/models.py +++ b/opentech/apply/review/models.py @@ -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 diff --git a/opentech/apply/review/templates/review/includes/review_opinions_list.html b/opentech/apply/review/templates/review/includes/review_opinions_list.html index 1e35da7ed..d26a90645 100644 --- a/opentech/apply/review/templates/review/includes/review_opinions_list.html +++ b/opentech/apply/review/templates/review/includes/review_opinions_list.html @@ -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 %} -- GitLab