Skip to content

Commit a6d9a8a

Browse files
authored
Fix typos in Dass Pass Service (#1403)
1 parent 5d980a1 commit a6d9a8a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/server/services/dataPasses/DataPassService.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class DataPassService {
5353
} else if (name) {
5454
queryBuilder.where('name').is(name);
5555
} else {
56-
throw new BadParameterError('Can not find without LHC Period id or name');
56+
throw new BadParameterError('Can not find without Data Pass id or name');
5757
}
5858

5959
queryBuilder.includeAttribute({
@@ -72,12 +72,12 @@ class DataPassService {
7272
* @return {Promise<DataPass[]>} the dats pass found
7373
*/
7474
async getOneOrFail({ id, name }) {
75-
const lhcPeriodStatistics = await this.getByIdentifier({ id, name });
76-
if (!lhcPeriodStatistics) {
75+
const dataPass = await this.getByIdentifier({ id, name });
76+
if (!dataPass) {
7777
const criteriaExpression = id !== undefined && id !== null ? `id (${id})` : `name (${name})`;
7878
throw new NotFoundError(`Data Pass with this ${criteriaExpression} could not be found`);
7979
}
80-
return lhcPeriodStatistics;
80+
return dataPass;
8181
}
8282

8383
/**

test/lib/server/services/dataPasses/DataPassesService.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ module.exports = () => {
5151
before(resetDatabaseContent);
5252

5353
it('should succesfully get by id', async () => {
54-
const lhcPeriod = await dataPassService.getByIdentifier({ id: 1 });
55-
expect(lhcPeriod).to.be.eql(LHC22b_apass1);
54+
const dataPass = await dataPassService.getByIdentifier({ id: 1 });
55+
expect(dataPass).to.be.eql(LHC22b_apass1);
5656
});
5757

5858
it('should succesfully get by name', async () => {
59-
const lhcPeriod = await dataPassService.getByIdentifier({ name: 'LHC22a_apass1' });
60-
expect(lhcPeriod).to.be.eql(LHC22a_apass1);
59+
const dataPass = await dataPassService.getByIdentifier({ name: 'LHC22a_apass1' });
60+
expect(dataPass).to.be.eql(LHC22a_apass1);
6161
});
6262

6363
it('should succesfully get all data', async () => {

0 commit comments

Comments
 (0)