fixed problem in ProxyExercise that caused: ActiveRecord::AssociationTypeMismatch (Exercise(#51937940) expected, got TrueClass(#7943420)):

This commit is contained in:
Thomas Hille
2017-10-25 11:28:27 +02:00
parent ed12401d67
commit 01aad0a4a6

View File

@ -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