diff --git a/lib/galaxy/webapps/galaxy/services/credentials.py b/lib/galaxy/webapps/galaxy/services/credentials.py index 6417f0614993..5a6819e7643f 100644 --- a/lib/galaxy/webapps/galaxy/services/credentials.py +++ b/lib/galaxy/webapps/galaxy/services/credentials.py @@ -111,7 +111,7 @@ def delete_credentials( session = trans.sa_session user_credentials = self._user_credentials(trans, user_id=user_id, group_id=group_id) - rows_to_be_deleted = {item for uc in user_credentials for item in uc if type(item) != UserCredentials} + rows_to_be_deleted = {item for uc in user_credentials for item in uc if not isinstance(item, UserCredentials)} for row in rows_to_be_deleted: session.delete(row) with transaction(session):