diff --git a/sepal_ui/planetapi/planet_model.py b/sepal_ui/planetapi/planet_model.py index 1674a7f3..dc613c3c 100644 --- a/sepal_ui/planetapi/planet_model.py +++ b/sepal_ui/planetapi/planet_model.py @@ -7,7 +7,6 @@ from planet.auth import Auth from planet.exceptions import NoPermission from planet.http import Session -from planet.models import Request from traitlets import Bool, Dict from sepal_ui.message import ms @@ -112,10 +111,10 @@ def _is_active(self): def get_subscriptions(self): """load the user subscriptions and return empty list if nothing found""" - req = Request(self.SUBS_URL, method="GET") + req = self.session.request("GET", self.SUBS_URL) try: - response = asyncio.run(self.session.request(req)) + response = asyncio.run(req) if response.status_code == 200: return response.json()