Skip to content

Commit

Permalink
refactor queries for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiahstroud committed Aug 10, 2023
1 parent f05a524 commit d1e8256
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/services/ams/backfill_asset_validation_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ def run(ids_file:)
private

def backfill_validation_status(id)
asset_admin_data_gid = ActiveFedora::SolrService.get("id:#{id}", fl: [:admin_data_gid_ssim], rows: 1).dig('response', 'docs').first
admin_data = AdminData.find_by_gid!(asset_admin_data_gid['admin_data_gid_ssim'].first)
solr_response = ActiveFedora::SolrService.get("id:#{id}", fl: [:admin_data_gid_ssim], rows: 1)
asset_admin_data_gid = solr_response.dig('response', 'docs', 0, 'admin_data_gid_ssim', 0)
admin_data = AdminData.find_by_gid!(asset_admin_data_gid)
attrs_for_actor = {}

raw_source_data = if admin_data.bulkrax_importer_id.present?
Expand Down

0 comments on commit d1e8256

Please sign in to comment.