truncate content with record

This commit is contained in:
Joerg Reichert 2023-04-30 00:56:46 +02:00
parent b733dedfab
commit 14688ad7e1

View file

@ -79,8 +79,8 @@ class Paper < ActiveRecord::Base
class << self class << self
def import_from_json(json_string) def import_from_json(json_string)
old_count = count old_count = count
content = truncate(record['content'], 99998)
JSON.parse(json_string).each do |record| JSON.parse(json_string).each do |record|
content = truncate(record['content'], 99998)
attributes = { attributes = {
body: record['body'], body: record['body'],
content: content, content: content,