Skip to content

Client list users method have attribute wrongly spell  #282

Open
@indrajeetgour

Description

@indrajeetgour

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions