mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: Properly associate user_profiles background urls via upload id.
`Upload#url` is more likely and can change from time to time. When it does changes, we don't want to have to look through multiple tables to ensure that the URLs are all up to date. Instead, we simply associate uploads properly to `UserProfile` so that it does not have to replicate the URLs in the table.
This commit is contained in:
parent
c9f6beba05
commit
24347ace10
39 changed files with 360 additions and 384 deletions
|
@ -281,7 +281,7 @@ class ImportScripts::NodeBB < ImportScripts::Base
|
|||
|
||||
return if !upload.persisted?
|
||||
|
||||
imported_user.user_profile.update(profile_background: upload.url)
|
||||
imported_user.user_profile.upload_profile_background(upload)
|
||||
ensure
|
||||
string_io.close rescue nil
|
||||
file.close rescue nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue