diff --git a/app/models/repository_checklist_value.rb b/app/models/repository_checklist_value.rb index cd09c9f1a..d3ab9e1cf 100644 --- a/app/models/repository_checklist_value.rb +++ b/app/models/repository_checklist_value.rb @@ -75,6 +75,8 @@ class RepositoryChecklistValue < ApplicationRecord end def self.import_from_text(text, attributes, _options = {}) + return nil if text.blank? + value = new(attributes) column = attributes.dig(:repository_cell_attributes, :repository_column) RepositoryImportParser::Util.split_by_delimiter(text: text, delimiter: column.delimiter_char).each do |item_text| diff --git a/app/models/repository_list_value.rb b/app/models/repository_list_value.rb index b99b08345..44392bb32 100644 --- a/app/models/repository_list_value.rb +++ b/app/models/repository_list_value.rb @@ -66,6 +66,8 @@ class RepositoryListValue < ApplicationRecord end def self.import_from_text(text, attributes, _options = {}) + return nil if text.blank? + value = new(attributes) column = attributes.dig(:repository_cell_attributes, :repository_column) list_item = column.repository_list_items.find { |item| item.data == text }