mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
FIX: do not fallback to flair_url column
flair_url is not loaded by our query anymore so avoid falling back to the old value
This commit is contained in:
parent
47c6fe9bfa
commit
c011b817b2
@ -748,7 +748,7 @@ class Group < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def flair_url
|
||||
flair_icon.presence || flair_upload&.url || self[:flair_url].presence
|
||||
flair_icon.presence || flair_upload&.url
|
||||
end
|
||||
|
||||
protected
|
||||
|
@ -972,24 +972,6 @@ describe Group do
|
||||
end
|
||||
end
|
||||
|
||||
it "allows Font Awesome 4.7 syntax as group avatar flair" do
|
||||
group = Fabricate(:group)
|
||||
group.flair_url = "fa-air-freshener"
|
||||
group.save
|
||||
|
||||
group = Group.find(group.id)
|
||||
expect(group.flair_url).to eq("fa-air-freshener")
|
||||
end
|
||||
|
||||
it "allows Font Awesome 5 syntax as group avatar flair" do
|
||||
group = Fabricate(:group)
|
||||
group.flair_url = "fab fa-bandcamp"
|
||||
group.save
|
||||
|
||||
group = Group.find(group.id)
|
||||
expect(group.flair_url).to eq("fab fa-bandcamp")
|
||||
end
|
||||
|
||||
context "Unicode usernames and group names" do
|
||||
before { SiteSetting.unicode_usernames = true }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user