truncate content

This commit is contained in:
Joerg Reichert 2023-04-29 23:57:26 +02:00
parent 9e7e38b525
commit b733dedfab

View file

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