Skip to content

Commit

Permalink
Remove duplicate apps for common group
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech committed Jul 11, 2024
1 parent b22fe3c commit 47dcb50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jhub_apps/service/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ def get_shared_servers(current_hub_user):
user_servers_without_default_jlab = list(filter(lambda server: server["name"] != "", all_users_servers))
hub_client_user = HubClient(username=current_hub_user['name'])
shared_servers = hub_client_user.get_shared_servers()
shared_server_names = {shared_server["server"]["name"] for shared_server in shared_servers}
shared_server_names = {
shared_server["server"]["name"] for shared_server in shared_servers
# remove shared apps by current user
if shared_server["server"]["user"]["name"] != current_hub_user['name']
}
shared_servers_rich = [
server for server in user_servers_without_default_jlab
if server["name"] in shared_server_names
Expand Down

0 comments on commit 47dcb50

Please sign in to comment.