diff --git a/controllers/admin/gamification_plugin_points_controller.rb b/controllers/admin/gamification_plugin_points_controller.rb index 089a71f..5dc0bf8 100644 --- a/controllers/admin/gamification_plugin_points_controller.rb +++ b/controllers/admin/gamification_plugin_points_controller.rb @@ -5,18 +5,18 @@ class GamificationPluginPointsController < PluginAdminController end def create - if params[:identifier].blank? - profile_id = nil - else - profile = Profile.where identifier: params[:identifier] - profile = profile.first - if profile.nil? - flash[:notice] = _("Can't find a profile with the given identifier") - redirect_to action: :index - return - end - profile_id = profile.id - end + if params[:identifier].blank? + profile_id = nil + else + profile = Profile.where identifier: params[:identifier] + profile = profile.first + if profile.nil? + flash[:notice] = _("Can't find a profile with the given identifier") + redirect_to action: :index + return + end + profile_id = profile.id + end GamificationPlugin::PointsType.all.each do |pType| GamificationPlugin::PointsCategorization.create point_type_id: pType.id, profile_id: profile_id, weight: 0 -- libgit2 0.21.2