Skip to content

Commit

Permalink
fix: display meaningfull message if the folder list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau committed Aug 8, 2023
1 parent cd7d97c commit 4c5a291
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

Check warning on line 57 in sepal_ui/scripts/decorator.py

View check run for this annotation

Codecov / codecov/patch

sepal_ui/scripts/decorator.py#L57

Added line #L57 was not covered by tests

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 4c5a291

Please sign in to comment.