From 7fd6b6ab519aac39ce5377ca01013bf31ebfeb16 Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 25 Dec 2023 07:51:45 +0100 Subject: [PATCH] fix api extract endpoint --- nullptr/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nullptr/api.py b/nullptr/api.py index 440e33c..655663b 100644 --- a/nullptr/api.py +++ b/nullptr/api.py @@ -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