Skip to content

A platform for community discussion. Free, open, simple.

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

Maja Komel0a1b16bb1638
diff --git a/app/models/group.rb b/app/models/group.rb
index 88d37bb58aa..72d5a3a7245 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