FIX: variable name typo

This commit is contained in:
Vinoth Kannan 2018-05-21 13:47:30 +05:30
parent 09151190f9
commit b229c112f6
1 changed files with 7 additions and 7 deletions

View File

@ -157,15 +157,15 @@ class ImportScripts::Lithium < ImportScripts::Base
file ||= get_file(prefix + "profile.jpeg") file ||= get_file(prefix + "profile.jpeg")
if file.present? if file.present?
upload = UploadCreator.new(file, file.path, type: "avatar").create_for(user.id) upload = UploadCreator.new(file, file.path, type: "avatar").create_for(u.id)
user.create_user_avatar unless user.user_avatar u.create_user_avatar unless u.user_avatar
if !user.user_avatar.contains_upload?(upload.id) if !u.user_avatar.contains_upload?(upload.id)
user.user_avatar.update_columns(custom_upload_id: upload.id) u.user_avatar.update_columns(custom_upload_id: upload.id)
if user.uploaded_avatar_id.nil? || if u.uploaded_avatar_id.nil? ||
!user.user_avatar.contains_upload?(user.uploaded_avatar_id) !u.user_avatar.contains_upload?(u.uploaded_avatar_id)
user.update_columns(uploaded_avatar_id: upload.id) u.update_columns(uploaded_avatar_id: upload.id)
end end
end end
end end