BUGFIX: missing avatars in topic map
Cleanup uneeded column
This commit is contained in:
parent
a47581de18
commit
5adc486cef
|
@ -297,7 +297,7 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
results = UserSearch.new(term, topic_id: topic_id, searching_user: current_user).search
|
results = UserSearch.new(term, topic_id: topic_id, searching_user: current_user).search
|
||||||
|
|
||||||
user_fields = [:username, :use_uploaded_avatar, :upload_avatar_template, :uploaded_avatar_id]
|
user_fields = [:username, :upload_avatar_template, :uploaded_avatar_id]
|
||||||
user_fields << :name if SiteSetting.enable_names?
|
user_fields << :name if SiteSetting.enable_names?
|
||||||
|
|
||||||
to_render = { users: results.as_json(only: user_fields, methods: :avatar_template) }
|
to_render = { users: results.as_json(only: user_fields, methods: :avatar_template) }
|
||||||
|
|
|
@ -585,6 +585,7 @@ end
|
||||||
# version :integer default(1), not null
|
# version :integer default(1), not null
|
||||||
# cook_method :integer default(1), not null
|
# cook_method :integer default(1), not null
|
||||||
# wiki :boolean default(FALSE), not null
|
# wiki :boolean default(FALSE), not null
|
||||||
|
# baked_at :datetime
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -799,7 +799,6 @@ end
|
||||||
# blocked :boolean default(FALSE)
|
# blocked :boolean default(FALSE)
|
||||||
# dynamic_favicon :boolean default(FALSE), not null
|
# dynamic_favicon :boolean default(FALSE), not null
|
||||||
# title :string(255)
|
# title :string(255)
|
||||||
# use_uploaded_avatar :boolean default(FALSE)
|
|
||||||
# uploaded_avatar_id :integer
|
# uploaded_avatar_id :integer
|
||||||
# email_always :boolean default(FALSE), not null
|
# email_always :boolean default(FALSE), not null
|
||||||
# mailing_list_mode :boolean default(FALSE), not null
|
# mailing_list_mode :boolean default(FALSE), not null
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
class UserProfile < ActiveRecord::Base
|
class UserProfile < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# == Schema Information
|
||||||
|
#
|
||||||
|
# Table name: user_profiles
|
||||||
|
#
|
||||||
|
# user_id :integer not null, primary key
|
||||||
|
# location :string(255)
|
||||||
|
#
|
||||||
|
|
|
@ -18,7 +18,4 @@ class TopicPostCountSerializer < BasicUserSerializer
|
||||||
object[:user].uploaded_avatar_id
|
object[:user].uploaded_avatar_id
|
||||||
end
|
end
|
||||||
|
|
||||||
def include_uploaded_avatar_id?
|
|
||||||
SiteSetting.allow_uploaded_avatars? && object[:user].use_uploaded_avatar
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveUseUploadedAvatarFromUser < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
remove_column :users, :use_uploaded_avatar
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue