From 8638b7527bad7d8c13cdc0a8146f51cd67494490 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 4 May 2017 15:05:02 -0500 Subject: [PATCH] flags: don't set is_flagged twice. PostFlag#update_post already sets is_flagged when the flag is created. No need to set it again. --- app/models/post.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index 0fd17a293..a093080e3 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -301,8 +301,6 @@ class Post < ActiveRecord::Base if flag.errors.any? raise PostFlag::Error.new(flag.errors.full_messages.join("; ")) end - - update_column(:is_flagged, true) unless is_flagged? end def appeal!(reason)