Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANW-1548 Unexpected digital object bulk import requirement of DO uri or thumbnail #2695

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions backend/app/lib/bulk_import/import_digital_objects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,13 @@ def log_row(row)
end
end

# required fields for a digital object row: ead match, (ao_ref_id or ao_uri) and at least one of digital_object_link, thumbnail
# required fields for a digital object row: ead match, (ao_ref_id or ao_uri)
def check_row
err_arr = []
begin
if @row_hash["ao_ref_id"].nil? && @row_hash["ao_uri"].nil?
err_arr.push I18n.t("bulk_import.error.no_uri_or_ref")
end
obj_link = @row_hash["digital_object_link"]
thumb = @row_hash["thumbnail"] || @row_hash["Thumbnail"]
err_arr.push I18n.t("bulk_import.error.dig_info_miss") if @row_hash["digital_object_link"].nil? && thumb.nil?
end
normalize_publish_column(@row_hash)
normalize_publish_column(@row_hash, 'digital_object_link_publish')
Expand Down