1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

companion.py: Return CAPI data if not docked

Else at least one caller to .station() blows up when it can't find the
commander data.

The call has to be to .station() so as to populate the market/shipyard
added dictionaries.
This commit is contained in:
Athanasius 2020-09-18 12:48:21 +01:00
parent 22a8da5bf7
commit be541571d9

View File

@ -534,7 +534,7 @@ class Session(object):
"""Perform CAPI /profile endpoint query for station data."""
data = self.query(URL_QUERY)
if not data['commander'].get('docked'):
return None
return data
services = data['lastStarport'].get('services', {})