Fix player.ips

Removed circular method call
reminder
Etzelia 2018-10-18 16:53:40 +02:00
parent cb460e10c2
commit 03d343e44b
1 changed files with 4 additions and 3 deletions

View File

@ -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):