From 2ece46797bab584b6b54b35d7ae1ce9c76756c36 Mon Sep 17 00:00:00 2001 From: Pierre Romera Date: Mon, 22 Jan 2024 14:06:12 +0000 Subject: [PATCH] refactor: restore checkers property name --- prophecies/core/models/task_record.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prophecies/core/models/task_record.py b/prophecies/core/models/task_record.py index 7583a2b5..7d9ff611 100644 --- a/prophecies/core/models/task_record.py +++ b/prophecies/core/models/task_record.py @@ -62,14 +62,14 @@ def __str__(self): return f'Record #{self.id} to be review in {self.task.name}' @cached_property - def checkers_list(self): + def checkers(self): checkers = [review.checker for review in self.reviews.all()] return list(filter(None, checkers)) @cached_property def checkers_pretty(self): # Extract only the usernames - usernames = [checker.username for checker in self.checkers_list] + usernames = [checker.username for checker in self.checkers] count = len(usernames) # Use the correct format depending on the count or use `many` return {0: lambda u: 'nobody', 1: lambda u: u[0], 2: lambda u: ' and '.join(u), }.\ @@ -99,7 +99,7 @@ def actions(self): return Action.objects.public(self.actions_query | self.reviews_actions_query) def can_lock(self, user): - checkers_ids = [checker.id for checker in self.checkers_list] + checkers_ids = [checker.id for checker in self.checkers] return not self.locked and user.id in checkers_ids def can_unlock(self, user):