From 2dc438ec68411901281dd8f6c4ed8a93ca322d42 Mon Sep 17 00:00:00 2001 From: Ian Scott Date: Tue, 29 Oct 2024 22:01:21 -0400 Subject: [PATCH] fix(chore): Removing debugging statements --- invenio_remote_user_data_kcworks/components/groups.py | 6 +++--- invenio_remote_user_data_kcworks/ext.py | 2 +- invenio_remote_user_data_kcworks/service.py | 2 +- invenio_remote_user_data_kcworks/views.py | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/invenio_remote_user_data_kcworks/components/groups.py b/invenio_remote_user_data_kcworks/components/groups.py index 5dc145b..0c8517a 100644 --- a/invenio_remote_user_data_kcworks/components/groups.py +++ b/invenio_remote_user_data_kcworks/components/groups.py @@ -49,7 +49,7 @@ def get_roles_for_remote_group( def get_current_members_of_group(group_name: str) -> list[User]: """fetch a list of the users assigned the given group role""" my_group_role = current_accounts.datastore.find_role(group_name) - app.logger.debug(f"got group role {my_group_role}") + # app.logger.debug(f"got group role {my_group_role}") return [user for user in my_group_role.users] def get_current_user_roles(self, user: Union[str, User]) -> list: @@ -171,8 +171,8 @@ def remove_user_from_group( group_name = ( group_name if isinstance(group_name, str) else group_name.id ) - app.logger.debug(f"removing from user {user.email}") - app.logger.debug(user.roles) + # app.logger.debug(f"removing from user {user.email}") + # app.logger.debug(user.roles) removed_user = current_accounts.datastore.remove_role_from_user( user, group_name ) diff --git a/invenio_remote_user_data_kcworks/ext.py b/invenio_remote_user_data_kcworks/ext.py index 2744a6d..41673e6 100644 --- a/invenio_remote_user_data_kcworks/ext.py +++ b/invenio_remote_user_data_kcworks/ext.py @@ -32,7 +32,7 @@ def on_user_logged_in(_, user: User) -> None: "signal received " f"for user {user.id}" ) - current_app.logger.debug(f"current_user: {current_user}") + # current_app.logger.debug(f"current_user: {current_user}") # if self._data_is_stale(identity.id) and not self.update_in_progress: # my_user_identity = UserIdentity.query.filter_by( # id_user=identity.id diff --git a/invenio_remote_user_data_kcworks/service.py b/invenio_remote_user_data_kcworks/service.py index d96092d..c4bb555 100644 --- a/invenio_remote_user_data_kcworks/service.py +++ b/invenio_remote_user_data_kcworks/service.py @@ -640,7 +640,7 @@ def compare_remote_with_local( if r not in group_changes["dropped_groups"] ] new_data["user_profile"] = initial_user_data["user_profile"] - self.logger.debug(f"users data: {pformat(users)}") + # self.logger.debug(f"users data: {pformat(users)}") new_data["user_profile"].update( { "full_name": users["name"], diff --git a/invenio_remote_user_data_kcworks/views.py b/invenio_remote_user_data_kcworks/views.py index 6f0e5bc..fecbc48 100644 --- a/invenio_remote_user_data_kcworks/views.py +++ b/invenio_remote_user_data_kcworks/views.py @@ -159,10 +159,10 @@ def post(self): for e in data["updates"].keys(): if e in entity_types.keys(): - self.logger.debug( - f"In POST view: Received {e} update signal from " - f"{idp}: {data['updates'][e]}" - ) + # self.logger.debug( + # f"In POST view: Received {e} update signal from " + # f"{idp}: {data['updates'][e]}" + # ) for u in data["updates"][e]: if u["event"] in entity_types[e]["events"]: if e == "users": @@ -218,7 +218,7 @@ def post(self): f"Published {len(events)} events to queue and emitted" " remote_data_updated signal" ) - self.logger.debug(events) + # self.logger.debug(events) else: if not users and bad_users or not groups and bad_groups: entity_string = ""