Skip to content

Commit

Permalink
fix: display meaningfull message if the folder list is empty (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau authored Aug 10, 2023
2 parents cd7d97c + 4c5a291 commit 1e3cd4c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sepal_ui/message/en/utils.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"utils": {
"check_input": {
"error": "The value has not been initialized"
},
"ee": {
"no_asset_root": "No asset folder is available with this credentials. Please check your account and try again."
}
}
}
1 change: 1 addition & 0 deletions sepal_ui/scripts/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def init_ee() -> None:
# if the user is in local development the authentication should
# already be available
ee.Initialize(http_transport=httplib2.Http())
assert len(ee.data.getAssetRoots()) > 0, ms.utils.ee.no_asset_root

return

Expand Down
1 change: 1 addition & 0 deletions sepal_ui/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def init_ee() -> None:
# if the user is in local development the authentication should
# already be available
ee.Initialize(http_transport=httplib2.Http())
assert len(ee.data.getAssetRoots()) > 0, ms.utils.ee.no_asset_root

return

Expand Down

0 comments on commit 1e3cd4c

Please sign in to comment.