From: Steve Sutton Date: Tue, 14 Nov 2017 16:56:10 +0000 (-0500) Subject: Update for bug fix in the regEvent model X-Git-Tag: v1.0.0^2~276 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a2df79aac6e39ff44b89a8b37e93c0f5f6ed6314;p=WP-Plugins%2Fglm-member-db-registrations.git Update for bug fix in the regEvent model When getting the regTime id. --- 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