From 01aad0a4a69ddbf9915213c08ca64a75f894a5be Mon Sep 17 00:00:00 2001 From: Thomas Hille Date: Wed, 25 Oct 2017 11:28:27 +0200 Subject: [PATCH] fixed problem in ProxyExercise that caused: ActiveRecord::AssociationTypeMismatch (Exercise(#51937940) expected, got TrueClass(#7943420)): --- app/models/proxy_exercise.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/proxy_exercise.rb b/app/models/proxy_exercise.rb index 5922e062..82fad35f 100644 --- a/app/models/proxy_exercise.rb +++ b/app/models/proxy_exercise.rb @@ -36,8 +36,8 @@ class ProxyExercise < ActiveRecord::Base Rails.logger.debug("retrieved assigned exercise for user #{user.id}: Exercise #{assigned_user_proxy_exercise.exercise}" ) assigned_user_proxy_exercise.exercise else + Rails.logger.debug("find new matching exercise for user #{user.id}" ) matching_exercise = - Rails.logger.debug("find new matching exercise for user #{user.id}" ) begin find_matching_exercise(user) rescue => e #fallback