From a23f2040ddfcb4b1fc93f8a004d9537a5ba15a10 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 24 Oct 2019 16:22:31 -0400 Subject: [PATCH] RatingService: Remove unreachable error check --- src/server/service/RatingService.ts | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/server/service/RatingService.ts b/src/server/service/RatingService.ts index 9338758..0bf4fc8 100644 --- a/src/server/service/RatingService.ts +++ b/src/server/service/RatingService.ts @@ -123,24 +123,6 @@ export class RatingService } - private _getProgramRater( program: Program, quote: ServerSideQuote ) - { - var rater = this._rater_manager.byId( program.getId() ); - - // if a rater could not be found, we can't do any rating - if ( rater === null ) - { - this._logger.log( this._logger.PRIORITY_ERROR, - "Rating for quote %d (program %s) failed; missing module", - quote.getId(), - program.getId() - ); - } - - return rater; - } - - /** * Whether quote is still valid * @@ -181,13 +163,7 @@ export class RatingService c: RequestCallback, ) { - var rater = this._getProgramRater( program, quote ); - - if ( !rater ) - { - this._server.sendError( request, 'Unable to perform rating.' ); - c(); - } + var rater = this._rater_manager.byId( program.getId() ); this._logger.log( this._logger.PRIORITY_INFO, "Performing '%s' rating for quote #%s",