From 915ff7c82e539da3d0c4f05db825b4549f019d8b Mon Sep 17 00:00:00 2001 From: Lee Lawlor Date: Mon, 21 Apr 2014 23:02:22 -0400 Subject: [PATCH] fix minor error --- app/controllers/charts_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/charts_controller.rb b/app/controllers/charts_controller.rb index 5d5da11..4794a13 100644 --- a/app/controllers/charts_controller.rb +++ b/app/controllers/charts_controller.rb @@ -69,13 +69,11 @@ class ChartsController < ApplicationController # save chart options def update - #Check to see if we're using the new options, or the old - @channel = Channel.find(params[:channel_id]) @status = 0 # check permissions - if @channel.user_id == current_user.id + if current_user.present? && @channel.user_id == current_user.id logger.debug "Saving Data with new options " + params[:newOptions].to_s # save data if params[:newOptions]