RatingService: Remove unreachable error check
parent
1ed8ad1cd7
commit
a23f2040dd
|
@ -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
|
* Whether quote is still valid
|
||||||
*
|
*
|
||||||
|
@ -181,13 +163,7 @@ export class RatingService
|
||||||
c: RequestCallback,
|
c: RequestCallback,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var rater = this._getProgramRater( program, quote );
|
var rater = this._rater_manager.byId( program.getId() );
|
||||||
|
|
||||||
if ( !rater )
|
|
||||||
{
|
|
||||||
this._server.sendError( request, 'Unable to perform rating.' );
|
|
||||||
c();
|
|
||||||
}
|
|
||||||
|
|
||||||
this._logger.log( this._logger.PRIORITY_INFO,
|
this._logger.log( this._logger.PRIORITY_INFO,
|
||||||
"Performing '%s' rating for quote #%s",
|
"Performing '%s' rating for quote #%s",
|
||||||
|
|
Loading…
Reference in New Issue