From 3a1d0d0335279acfa246391953b3fb875f453bdc Mon Sep 17 00:00:00 2001 From: Adarnof Date: Sat, 25 Feb 2017 17:24:12 -0500 Subject: [PATCH] use v1 Universe for structure names --- fleetactivitytracking/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fleetactivitytracking/views.py b/fleetactivitytracking/views.py index 067d91c9..f31f7cf7 100644 --- a/fleetactivitytracking/views.py +++ b/fleetactivitytracking/views.py @@ -212,13 +212,14 @@ def click_fatlink_view(request, token, hash, fatname): location['solar_system_name'] = \ c.Universe.get_universe_systems_system_id(system_id=location['solar_system_id']).result()[ 'name'] - if location['structure_id']: + if location['station_id']: + location['station_name'] = \ + c.Universe.get_universe_stations_station_id(station_id=location['station_id']).result()['name'] + elif location['structure_id']: + c = token.get_esi_client(Universe='v1') location['station_name'] = \ c.Universe.get_universe_structures_structure_id(structure_id=location['structure_id']).result()[ 'name'] - elif location['station_id']: - location['station_name'] = \ - c.Universe.get_universe_stations_station_id(station_id=location['station_id']).result()['name'] else: location['station_name'] = "No Station" ship['ship_type_name'] = EveManager.get_itemtype(ship['ship_type_id']).name