fix api extract endpoint
This commit is contained in:
parent
74a9c391e9
commit
7fd6b6ab51
@ -239,10 +239,12 @@ class Api:
|
||||
|
||||
def extract(self, ship, survey=None):
|
||||
data = {}
|
||||
url = f'my/ships/{ship}/extract'
|
||||
if survey is not None:
|
||||
data['survey'] = survey.api_dict()
|
||||
url += '/survey'
|
||||
try:
|
||||
data = self.request('post', f'my/ships/{ship}/extract', data=data)
|
||||
data = self.request('post', url, data=data)
|
||||
except ApiError as e:
|
||||
if e.code in [ 4221, 4224]:
|
||||
survey.exhausted = True
|
||||
|
Loading…
Reference in New Issue
Block a user