From 03d343e44b23919cc3045f157c69b58f6d6bbd1e Mon Sep 17 00:00:00 2001 From: Etzelia Date: Thu, 18 Oct 2018 16:53:40 +0200 Subject: [PATCH] Fix player.ips Removed circular method call --- models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models.py b/models.py index 1da59f0..1dfadd4 100644 --- a/models.py +++ b/models.py @@ -170,9 +170,10 @@ class Player(models.Model): @property def ips(self): ips = [] - query = IP.api.filter(player=self) - for q in query: - ips.append(q.ip) + if not getattr(self.auth_user, 'is_active', False): + query = IP.objects.filter(player=self) + for q in query: + ips.append(q.ip) return " ".join(ips) def __str__(self):