@@ -277,7 +277,12 @@ DEFAULT_STAFF_ROLES = {
277
277
dataEntry : true ,
278
278
} ;
279
279
280
- Competitions = new Mongo . Collection ( "competitions" , { transform : function ( doc ) { return new Competition ( doc ) ; } } ) ;
280
+ Competitions = new Mongo . Collection ( "competitions" , {
281
+ transform : function ( doc ) {
282
+ return new Competition ( doc ) ;
283
+ }
284
+ } ) ;
285
+
281
286
Schema . competition = new SimpleSchema ( {
282
287
competitionName : {
283
288
type : String ,
@@ -307,7 +312,9 @@ Schema.competition = new SimpleSchema({
307
312
let obj = validationObject ( this , [ 'calendarStartMinutes' ] ) ;
308
313
309
314
let events = ScheduleEvents . find ( { competitionId : obj . id } ) . fetch ( ) ;
310
- if ( _ . any ( events , function ( event ) { return event . startMinutes < obj . calendarStartMinutes ; } ) ) {
315
+ if ( _ . any ( events , function ( event ) {
316
+ return event . startMinutes < obj . calendarStartMinutes ;
317
+ } ) ) {
311
318
return "earlierExistingEvents" ;
312
319
}
313
320
} ,
@@ -326,7 +333,9 @@ Schema.competition = new SimpleSchema({
326
333
}
327
334
328
335
let events = ScheduleEvents . find ( { competitionId : obj . id } ) . fetch ( ) ;
329
- if ( _ . any ( events , function ( event ) { return event . endMinutes ( ) > obj . calendarEndMinutes ; } ) ) {
336
+ if ( _ . any ( events , function ( event ) {
337
+ return event . endMinutes ( ) > obj . calendarEndMinutes ;
338
+ } ) ) {
330
339
return "laterExistingEvents" ;
331
340
}
332
341
} ,
@@ -352,7 +361,9 @@ Schema.competition = new SimpleSchema({
352
361
let obj = validationObject ( this , [ 'numberOfDays' ] ) ;
353
362
354
363
let events = ScheduleEvents . find ( { competitionId : obj . id } ) . fetch ( ) ;
355
- if ( _ . any ( events , function ( event ) { return event . nthDay >= obj . numberOfDays ; } ) ) {
364
+ if ( _ . any ( events , function ( event ) {
365
+ return event . nthDay >= obj . numberOfDays ;
366
+ } ) ) {
356
367
return "laterDayExistingEvents" ;
357
368
}
358
369
} ,
0 commit comments