From d1bf8eb03d5d505fde92dbe7bb3dca880eb3a55c Mon Sep 17 00:00:00 2001 From: Toks Date: Wed, 3 Jun 2015 21:37:41 -0400 Subject: [PATCH] Fix commentary being created even if user says not to --- app/models/upload.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/upload.rb b/app/models/upload.rb index df28b7db6..f69c61b25 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -123,7 +123,7 @@ class Upload < ActiveRecord::Base post.distribute_files if post.save CurrentUser.increment!(:post_upload_count) - create_artist_commentary(post) if include_artist_commentary + create_artist_commentary(post) if include_artist_commentary? ugoira_service.save_frame_data(post) if is_ugoira? update_attributes(:status => "completed", :post_id => post.id) else @@ -532,4 +532,8 @@ class Upload < ActiveRecord::Base def upload_as_pending? as_pending == "1" end + + def include_artist_commentary? + include_artist_commentary == "1" + end end