mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-13 18:46:25 +01:00
Prevent admin error when EveCharacter has no assigned user.
This commit is contained in:
@@ -22,6 +22,7 @@ class EveCharacterAdmin(admin.ModelAdmin):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def main_character(obj):
|
def main_character(obj):
|
||||||
|
if obj.user:
|
||||||
auth = AuthServicesInfo.objects.get_or_create(user=obj.user)[0]
|
auth = AuthServicesInfo.objects.get_or_create(user=obj.user)[0]
|
||||||
if auth and auth.main_char_id:
|
if auth and auth.main_char_id:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user