Fix setting the profile pic from user pic on creation
This commit is contained in:
parent
28e0e373df
commit
354b93bbf9
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ class Profile < ApplicationRecord
|
|||
def set_defaults
|
||||
self.name ||= user.name if user
|
||||
self.email ||= user.email if user
|
||||
self.picture ||= user.picture if user
|
||||
self.picture.attach(user.picture) if user && user.picture.attached?
|
||||
picture.attach(io: File.open(Settings.default.image.profile),
|
||||
filename: "profile-image.png") unless self.picture.attached?
|
||||
if self.name.blank? && first_name.present? && last_name.present?
|
||||
|
|
Loading…
Reference in a new issue