Skip to content

Commit

Permalink
Holdings cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdholloway committed Jan 11, 2025
1 parent 81ce79b commit 22506ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions lib/digital_scriptorium/ds_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,5 @@ def holding?
def record?
instance_of_claims.any? { |claim| claim.entity_id_value == ItemId::RECORD }
end

def current_holding?
holding? && status_claims.any? { |claim| claim.data_value == 'current' }
end
end
end
2 changes: 1 addition & 1 deletion lib/digital_scriptorium/ds_meta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize(record, export_hash)
end

def current?(holding)
holding.claims_by_property_id(HOLDING_STATUS)&.first&.entity_id_value == HOLDING_STATUS_CURRENT
holding.holding_status == HOLDING_STATUS_CURRENT
end

def current_holdings(manuscript, export_hash)
Expand Down

0 comments on commit 22506ab

Please sign in to comment.