Correct CorpStats tests.

This commit is contained in:
Adarnof 2018-02-22 17:44:59 -05:00
parent 70c2a4a6e4
commit 9c74952607

View File

@ -122,10 +122,10 @@ class CorpStats(models.Model):
m.character_id)]) m.character_id)])
def visible_to(self, user): def visible_to(self, user):
return self.objects.filter(pk=self.pk).visible_to(user).exists() return CorpStats.objects.filter(pk=self.pk).visible_to(user).exists()
def can_update(self, user): def can_update(self, user):
return self.visible_to(user) return self.token.user == user or self.visible_to(user)
def corp_logo(self, size=128): def corp_logo(self, size=128):
return "https://image.eveonline.com/Corporation/%s_%s.png" % (self.corp.corporation_id, size) return "https://image.eveonline.com/Corporation/%s_%s.png" % (self.corp.corporation_id, size)