FIX: Import script was broken after upgrade of sqlite3 gem (#27648)

This commit is contained in:
Gerhard Schlager 2024-07-02 09:38:15 +02:00 committed by GitHub
parent 2ab4913d13
commit 7c26d5d084
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -1000,7 +1000,7 @@ class BulkImport::Base
def process_user(user)
if user[:email].present?
user[:email].downcase!
user[:email] = user[:email].downcase
if (existing_user_id = @emails[user[:email]])
@users[user[:imported_id].to_i] = existing_user_id

View File

@ -784,7 +784,7 @@ class BulkImport::Generic < BulkImport::Base
end
def post_raw(row, group_names)
raw = row["raw"]
raw = row["raw"].dup
placeholders = row["placeholders"]&.then { |json| JSON.parse(json) }
if (polls = placeholders&.fetch("polls", nil))
@ -2351,7 +2351,7 @@ class BulkImport::Generic < BulkImport::Base
end
def calculate_external_url(row)
external_url = row["external_url"]
external_url = row["external_url"].dup
placeholders = row["external_url_placeholders"]&.then { |json| JSON.parse(json) }
return external_url unless placeholders