Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: drop use of Request from planet #655

Merged
merged 3 commits into from
Dec 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions sepal_ui/planetapi/planet_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down