FIX: Create empty user_avatar row if not exist
This commit is contained in:
parent
ac0053f491
commit
f3868fd646
|
@ -870,6 +870,8 @@ class UsersController < ApplicationController
|
|||
return render_json_error I18n.t("avatar.missing")
|
||||
end
|
||||
|
||||
user.create_user_avatar unless user.user_avatar
|
||||
|
||||
if type == "gravatar"
|
||||
user.user_avatar.gravatar_upload_id = upload_id
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue