diff --git a/manage_notifications/api/views.py b/manage_notifications/api/views.py index 7844e53..bf8b23f 100644 --- a/manage_notifications/api/views.py +++ b/manage_notifications/api/views.py @@ -114,10 +114,8 @@ class DeletePlayerID(APIView): def post(self, request): try: - if hasattr(request.user, "player_id"): - request.user.player_id = ( - None # or use a dedicated method to delete the player ID - ) + if request.user.player_id: + del request.user.player_id return ApiResponse.success( message=constants.SUCCESS, data="Player ID Deleted Successfully!",