From 5f88e7e1a530f9ad0a1d409e20ee48550739cc91 Mon Sep 17 00:00:00 2001 From: Adarnof Date: Tue, 13 Dec 2016 20:22:09 -0500 Subject: [PATCH] Correct permission check for showing APIs --- corputils/models.py | 2 +- corputils/templates/corputils/corpstats.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/corputils/models.py b/corputils/models.py index 9fc6c746..3a29d058 100644 --- a/corputils/models.py +++ b/corputils/models.py @@ -87,7 +87,7 @@ class CorpStats(models.Model): auth = AuthServicesInfo.objects.get_or_create(user=user)[0] if auth.main_char_id: try: - char = EveCharacter.objects.get(id=auth.main_char_id) + char = EveCharacter.objects.get(character_id=auth.main_char_id) if char.corporation_id == self.corp.corporation_id and user.has_perm('corputils.corp_apis'): return True if self.corp.alliance and char.alliance_id == self.corp.alliance.alliance_id and user.has_perm('corputils.alliance_apis'): diff --git a/corputils/templates/corputils/corpstats.html b/corputils/templates/corputils/corpstats.html index fbebcf31..45a2a63c 100644 --- a/corputils/templates/corputils/corpstats.html +++ b/corputils/templates/corputils/corpstats.html @@ -14,9 +14,9 @@ {% endif %} - {{ corpstats.corp.corporation_name }} +

{{ corpstats.corp.corporation_name }}

{% if corpstats.corp.alliance %} - {{ corpstats.corp.alliance.alliance_name }} +

{{ corpstats.corp.alliance.alliance_name }}

{% endif %}