Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Client list users method have attribute wrongly spell #282

Open
indrajeetgour opened this issue Aug 11, 2023 · 0 comments
Open

Client list users method have attribute wrongly spell #282

indrajeetgour opened this issue Aug 11, 2023 · 0 comments

Comments

@indrajeetgour
Copy link

See I wanted to know all the users which are currently active.
Problem with the current code is, list_users() returns list of dictionary. And each dictionary has attribute activeWebSocketSesssions, ideally this should be activeWebSocketSessions.

Note - I wanted to make that change using the pull request, but I did not find this attribute in the current codebase, may be because you guys did not revel it, may be not. Aways this is my finding, that will help make this product a bit better.

    def list_active_users(self):
        """
        Get all the active users who currently login to the DSS

        This method takes nothing and returns name of the users who are actively working now

        Returns:
        string: calculate all currently active users
        """
        user_list = []
        dss_users = self.client.list_users()
        for user in dss_users:
            if user["activeWebSocketSesssions"] != 0:
                user_list.append(user["displayName"])
                
        return user_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant