From a2df79aac6e39ff44b89a8b37e93c0f5f6ed6314 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 14 Nov 2017 11:56:10 -0500 Subject: [PATCH] Update for bug fix in the regEvent model When getting the regTime id. --- js/frontRegApp.js | 2 +- js/models/front/regEvent.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/frontRegApp.js b/js/frontRegApp.js index 3084bf5..5bc2da4 100644 --- a/js/frontRegApp.js +++ b/js/frontRegApp.js @@ -168,7 +168,7 @@ app.Models.Front.RegEvent = Backbone.Model.extend({ var hasRegTime = _.findWhere(foundClass, { reg_time: foundRegTime.id }); if ( !hasRegTime ) { foundClass.regTimes.create( foundRegTime[0] ); - hasRegTime = foundClass.regTimes.findWhere({ id: foundRegTime[0].id }); + hasRegTime = foundClass.regTimes.findWhere({ id: foundRegTime.id }); hasRegTime.set({ parent: foundClass }); } // Add the registrant diff --git a/js/models/front/regEvent.js b/js/models/front/regEvent.js index a8c57cd..23cdf74 100644 --- a/js/models/front/regEvent.js +++ b/js/models/front/regEvent.js @@ -35,7 +35,7 @@ app.Models.Front.RegEvent = Backbone.Model.extend({ var hasRegTime = _.findWhere(foundClass, { reg_time: foundRegTime.id }); if ( !hasRegTime ) { foundClass.regTimes.create( foundRegTime[0] ); - hasRegTime = foundClass.regTimes.findWhere({ id: foundRegTime[0].id }); + hasRegTime = foundClass.regTimes.findWhere({ id: foundRegTime.id }); hasRegTime.set({ parent: foundClass }); } // Add the registrant -- 2.17.1