FIX: clean up cooked group bio when bio is removed (#7745)

approved
#1

FIX: clean up cooked group bio when bio is removed (#7745)

diff --git a/app/models/group.rb b/app/models/group.rb
index 88d37bb..72d5a3a 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -209,8 +209,10 @@ class Group < ActiveRecord::Base
   end
 
   def cook_bio
-    if !self.bio_raw.blank?
+    if self.bio_raw.present?
       self.bio_cooked = PrettyText.cook(self.bio_raw)
+    else
+      self.bio_cooked = nil
     end
   end

GitHub sha: 0a1b16bb

1 Like
Approved #2