Skip to content

Commit cc6ce75

Browse files
committed
[sc-80908] implementing feedbacks
1 parent 8f2fe5a commit cc6ce75

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

dataikuapi/dss/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def last_successful_login(self):
403403
"""
404404
Get the last successful login of the user as a :class:`datetime.datetime`
405405
406-
Returns None if there were no successful login for this user.
406+
Returns None if there was no successful login for this user.
407407
408408
:return: the last successful login
409409
:rtype: :class:`datetime.datetime` or None
@@ -428,7 +428,7 @@ def last_failed_login(self):
428428
def last_session_activity(self):
429429
"""
430430
Get the last session activity of the user as a :class:`datetime.datetime`, i.e. the last time
431-
he opened a new DSS tab or refreshed his session.
431+
the user opened a new DSS tab or refreshed his session.
432432
433433
Returns None if there is no session activity yet.
434434

dataikuapi/dssclient.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def create_user(self, login, password, display_name='', source_type='LOCAL', gro
386386
def get_own_user(self):
387387
return DSSOwnUser(self)
388388

389-
def list_users_activity(self, as_objects=False, enabledUsersOnly=False):
389+
def list_users_activity(self, enabled_users_only=False):
390390
"""
391391
List all users activity
392392
@@ -396,14 +396,11 @@ def list_users_activity(self, as_objects=False, enabledUsersOnly=False):
396396
:rtype: list of :class:`dataikuapi.dss.admin.DSSUserActivity` or a list of dict
397397
"""
398398
params = {
399-
"enabledUsersOnly": enabledUsersOnly
399+
"enabledUsersOnly": enabled_users_only
400400
}
401-
all_activity = self._perform_json("GET", "/admin/users/activity", params=params)
401+
all_activity = self._perform_json("GET", "/admin/users-activity", params=params)
402402

403-
if as_objects:
404-
return [DSSUserActivity(self, user_activity["login"], user_activity) for user_activity in all_activity]
405-
else:
406-
return all_activity
403+
return [DSSUserActivity(self, user_activity["login"], user_activity) for user_activity in all_activity]
407404

408405

409406
########################################################

0 commit comments

Comments
 (0)