2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Don't try to import invalid websites

This commit is contained in:
Gerhard Schlager 2016-02-21 17:38:04 +01:00
parent e8d837269b
commit eb166e78b6
2 changed files with 5 additions and 3 deletions

View file

@ -306,8 +306,8 @@ class ImportScripts::Base
User.transaction do
u.save!
if bio_raw.present? || website.present? || location.present?
u.user_profile.bio_raw = bio_raw if bio_raw.present?
u.user_profile.website = website if website.present?
u.user_profile.bio_raw = bio_raw[0..2999] if bio_raw.present?
u.user_profile.website = website unless website.blank? || website !~ UserProfile::WEBSITE_REGEXP
u.user_profile.location = location if location.present?
u.user_profile.save!
end