From 400eef3118162495a7c5a53ced366ae851af52d6 Mon Sep 17 00:00:00 2001 From: Ralf Teusner Date: Wed, 15 Aug 2018 15:43:37 +0200 Subject: [PATCH] move logging statement up to be sure that its result is not assigned to matching_exercise if an error might be thrown. --- 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 461b5b67..cd187eb2 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